Commit 2192dc4f by Kálmán Viktor

dashboard: prettify test mock

parent a892ffb6
Pipeline #78 passed with stage
in 0 seconds
......@@ -615,13 +615,12 @@ class NodeDetailTest(LoginMixin, MockCeleryMixin, TestCase):
node = Node.objects.get(pk=1)
trait, created = Trait.objects.get_or_create(name='testtrait')
node.traits.add(trait)
self.patcher = patch("vm.tasks.vm_tasks.get_queues")
self.mock_check_queue = self.patcher.start()
self.mock_check_queue.return_value = {
self.patcher = patch("vm.tasks.vm_tasks.get_queues", return_value={
'x': [{'name': "devenv.vm.fast"}],
'y': [{'name': "devenv.vm.slow"}],
'z': [{'name': "devenv.net.fast"}],
}
})
self.patcher.start()
def tearDown(self):
super(NodeDetailTest, self).tearDown()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment