aboutsummaryrefslogtreecommitdiff
path: root/lava_scheduler_app/tests/test_pipeline.py
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2016-09-08 09:36:41 +0100
committerStevan Radakovic <stevan.radakovic@linaro.org>2016-09-14 07:32:51 +0000
commiteecad52db4a4f7cfd67776cd95929367333b3153 (patch)
tree6584ed5d59b2708b08a03e03abb3bf33bba0ac9a /lava_scheduler_app/tests/test_pipeline.py
parentf0c4d3b2354d113850a0f3166ade4466bc65de83 (diff)
Port submission priority support to V2
Change-Id: If25e967f510454f3e4cf3b7ec9da3818e04919d3 Closes: #2508
Diffstat (limited to 'lava_scheduler_app/tests/test_pipeline.py')
-rw-r--r--lava_scheduler_app/tests/test_pipeline.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lava_scheduler_app/tests/test_pipeline.py b/lava_scheduler_app/tests/test_pipeline.py
index 243729eaf..52ae7a8d1 100644
--- a/lava_scheduler_app/tests/test_pipeline.py
+++ b/lava_scheduler_app/tests/test_pipeline.py
@@ -116,6 +116,7 @@ class PipelineDeviceTags(TestCaseWithFactory):
self.assertIn('timeouts', data)
self.assertIn('job', data['timeouts'])
self.assertIn('context', data)
+ self.assertIn('priority', data)
self.assertEqual(data['context']['arch'], self.conf['arch'])
def test_make_device(self):
@@ -134,6 +135,13 @@ class PipelineDeviceTags(TestCaseWithFactory):
self.factory.make_job_json(),
self.factory.make_user())
+ def test_priority(self):
+ self.factory.make_device(self.device_type, 'fakeqemu3')
+ job = TestJob.from_yaml_and_user(
+ self.factory.make_job_json(),
+ self.factory.make_user())
+ self.assertEqual(TestJob.LOW, job.priority)
+
def test_yaml_device_tags(self):
Tag.objects.all().delete()
tag_list = [