diff options
-rw-r--r-- | vio/vio/tests/test_fake_nova_view.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_nova_view.py b/vio/vio/tests/test_fake_nova_view.py index 8e3fdab..89e1bc8 100644 --- a/vio/vio/tests/test_fake_nova_view.py +++ b/vio/vio/tests/test_fake_nova_view.py @@ -40,3 +40,13 @@ class TestFakeNovaServer(unittest.TestCase): } resp = self.view.get(req, "abcd", Server) self.assertEqual(200, resp.status_code) + + @mock.patch.object(fakeResponse, "delete_server") + def test_delete_server(self, mock_delete_server): + req = mock.Mock() + req.META = { + "HTTP_X_AUTH_TOKEN": Token + } + mock_delete_server.return_value = {} + resp = self.view.delete(req, "abcd", Server) + self.assertEqual(204, resp.status_code) |