From 50a6f53098543685bd263cc94526cd5e5dbd4fc2 Mon Sep 17 00:00:00 2001 From: Őry Máté Date: Sat, 15 Mar 2014 20:16:33 +0100 Subject: [PATCH] vm: fix tests they didn't even run --- circle/vm/tests/test_models.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/circle/vm/tests/test_models.py b/circle/vm/tests/test_models.py index c0e94d8..99b1bd1 100644 --- a/circle/vm/tests/test_models.py +++ b/circle/vm/tests/test_models.py @@ -36,17 +36,18 @@ class InstanceTestCase(TestCase): inst = Mock(state='RUNNING') assert Instance.is_running.getter(inst) - def deploy_destroyed(self): - inst = Mock(destroyed_at=datetime.now()) + def test_deploy_destroyed(self): + inst = Mock(destroyed_at=datetime.now(), spec=Instance, + InstanceDestroyedError=Instance.InstanceDestroyedError) with self.assertRaises(Instance.InstanceDestroyedError): Instance.deploy(inst) - def destroy_destroyed(self): - inst = Mock(destroyed_at=datetime.now()) + def test_destroy_destroyed(self): + inst = Mock(destroyed_at=datetime.now(), spec=Instance) Instance.destroy(inst) self.assertFalse(inst.save.called) - def destroy_sets_destroyed(self): + def test_destroy_sets_destroyed(self): inst = MagicMock(destroyed_at=None, spec=Instance) inst.node = MagicMock(spec=Node) inst.disks.all.return_value = [] -- libgit2 0.26.0