diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-07-21 14:43:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-26 08:10:36 +0100 |
commit | ef627d0ab8f5cf2fc72005393e76047cb623ff3d (patch) | |
tree | ae0067545010621d688baea77197ec50c7db7acc /bitbake/lib/toaster/bldcontrol/tests.py | |
parent | ffc78d329d6fed9ae9a0db470d30033069b42f8f (diff) | |
download | poky-ef627d0ab8f5cf2fc72005393e76047cb623ff3d.tar.gz |
bitbake: toaster: Replace references to LayerSource models
Replace references to the now deprecated layersource models across
Toaster with the new enums for layer source types.
(Bitbake rev: 48c09c62eb979d840132e58144f0d81ffee675b1)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/tests.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/tests.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py index 32985c3280..475ac0a16f 100644 --- a/bitbake/lib/toaster/bldcontrol/tests.py +++ b/bitbake/lib/toaster/bldcontrol/tests.py | |||
@@ -139,22 +139,3 @@ class RunBuildsCommandTests(TestCase): | |||
139 | self.assertTrue(br.state == BuildRequest.REQ_INPROGRESS, "Request is not updated") | 139 | self.assertTrue(br.state == BuildRequest.REQ_INPROGRESS, "Request is not updated") |
140 | # no more selections possible here | 140 | # no more selections possible here |
141 | self.assertRaises(IndexError, command._selectBuildRequest) | 141 | self.assertRaises(IndexError, command._selectBuildRequest) |
142 | |||
143 | |||
144 | class UtilityTests(TestCase): | ||
145 | def test_reduce_path(self): | ||
146 | from bldcontrol.management.commands.loadconf import _reduce_canon_path, _get_id_for_sourcetype | ||
147 | |||
148 | self.assertTrue( _reduce_canon_path("/") == "/") | ||
149 | self.assertTrue( _reduce_canon_path("/home/..") == "/") | ||
150 | self.assertTrue( _reduce_canon_path("/home/../ana") == "/ana") | ||
151 | self.assertTrue( _reduce_canon_path("/home/../ana/..") == "/") | ||
152 | self.assertTrue( _reduce_canon_path("/home/ana/mihai/../maria") == "/home/ana/maria") | ||
153 | |||
154 | def test_get_id_for_sorucetype(self): | ||
155 | from bldcontrol.management.commands.loadconf import _reduce_canon_path, _get_id_for_sourcetype | ||
156 | self.assertTrue( _get_id_for_sourcetype("layerindex") == 1) | ||
157 | self.assertTrue( _get_id_for_sourcetype("local") == 0) | ||
158 | self.assertTrue( _get_id_for_sourcetype("imported") == 2) | ||
159 | with self.assertRaises(Exception): | ||
160 | _get_id_for_sourcetype("unknown") | ||