From 84daa40bc7600df75d93db358be94cac10452936 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 9 Dec 2015 19:56:38 -0800 Subject: bitbake: toaster: use OneToOneField instead of ForeignKey Used OneToOneField to reference BuildRequest in BRBitbake model. Fixed django warning: WARNINGS: Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. (Bitbake rev: aaa4319ebbb06facb77b4ba936cf3aa2068ff238) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/toaster/bldcontrol/tests.py') diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py index f54cf7f366..141b42acbc 100644 --- a/bitbake/lib/toaster/bldcontrol/tests.py +++ b/bitbake/lib/toaster/bldcontrol/tests.py @@ -18,7 +18,7 @@ import subprocess import os # standard poky data hardcoded for testing -BITBAKE_LAYERS = [type('bitbake_info', (object,), { "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "", "commit": "HEAD"})] +BITBAKE_LAYER = type('bitbake_info', (object,), { "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "", "commit": "HEAD"}) POKY_LAYERS = [ type('poky_info', (object,), { "name": "meta", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta", "commit": "HEAD"}), type('poky_info', (object,), { "name": "meta-yocto", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta-yocto", "commit": "HEAD"}), @@ -53,7 +53,7 @@ class BEControllerTests(object): bc = self._getBEController(obe) try: # setting layers, skip any layer info - bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) + bc.setLayers(BITBAKE_LAYER, POKY_LAYERS) except NotImplementedException, e: print "Test skipped due to command not implemented yet" return True @@ -80,7 +80,7 @@ class BEControllerTests(object): layerSet = False try: # setting layers, skip any layer info - layerSet = bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS) + layerSet = bc.setLayers(BITBAKE_LAYER, POKY_LAYERS) except NotImplementedException: print "Test skipped due to command not implemented yet" return True -- cgit v1.2.3-54-g00ecf