summaryrefslogtreecommitdiffstats
path: root/genericparser/samples/tests.py
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-04-30 15:59:45 +0800
committerYan Yang <yangyanyj@chinamobile.com>2019-04-30 08:25:47 +0000
commit52a969dcc2a935930a559b1780d7c95e1cc45d73 (patch)
treeb95f60a4c719a0a24b5343f09fe17cb6fe060666 /genericparser/samples/tests.py
parent63c392e9cca3c6654e8383f49e5136fa86d1c72a (diff)
code refactor for genericparser1.0.0
Change-Id: I68a128944cde015d767576fc4e159d67db2d6b5d Issue-ID: VFC-1372 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'genericparser/samples/tests.py')
-rw-r--r--genericparser/samples/tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/genericparser/samples/tests.py b/genericparser/samples/tests.py
index 9e4c027..81ef49a 100644
--- a/genericparser/samples/tests.py
+++ b/genericparser/samples/tests.py
@@ -31,3 +31,15 @@ class SampleViewTest(unittest.TestCase):
self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)
resp_data = json.loads(response.content)
self.assertEqual({"status": "active"}, resp_data)
+
+
+class CallbackSampleTest(unittest.TestCase):
+ def setUp(self):
+ self.client = Client()
+
+ def tearDown(self):
+ pass
+
+ def test_callback(self):
+ response = self.client.get("/api/genericparser/v1/callback_sample")
+ self.assertEqual(status.HTTP_204_NO_CONTENT, response.status_code, response.content)