summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vio/vio/tests/test_fake_neutron_view.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/vio/vio/tests/test_fake_neutron_view.py b/vio/vio/tests/test_fake_neutron_view.py
index 4a9c061..6c62b0b 100644
--- a/vio/vio/tests/test_fake_neutron_view.py
+++ b/vio/vio/tests/test_fake_neutron_view.py
@@ -40,7 +40,7 @@ class TestakeNeutron(unittest.TestCase):
self.assertEqual(200, resp.status_code)
-class TesFakeNeutronNetwork(unittest.TestCase):
+class TestFakeNeutronNetwork(unittest.TestCase):
def setUp(self):
self.view = views.FakeNeutronNetwork()
@@ -56,3 +56,21 @@ class TesFakeNeutronNetwork(unittest.TestCase):
}
resp = self.view.get(req)
self.assertEqual(200, resp.status_code)
+
+
+class TestFakeNeutronDetail(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeNeutronDetail()
+
+ @mock.patch.object(fakeResponse, "neutron_detail")
+ def test_get_neutron_detail(self, mock_neutron_detail):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": Token
+ }
+ mock_neutron_detail.return_value = {
+ "network": "net1"
+ }
+ resp = self.view.get(req, "1234abcd")
+ self.assertEqual(200, resp.status_code)