From 83e28c08804647ab40b9ce90a5742d6049fe273d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ayrton=20Sau=C3=A9=20Cossuol?= Date: Tue, 6 Oct 2020 15:24:28 -0300 Subject: [PATCH] Update globomap_test.py Added create elements test --- tests/globomap_test.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/globomap_test.py b/tests/globomap_test.py index 3571a87..a0deb9b 100644 --- a/tests/globomap_test.py +++ b/tests/globomap_test.py @@ -30,20 +30,20 @@ def setUp(self): def tearDownClass(cls): patch.stopall() - # def test_create_element(self): - # requests_mock = self._mock_request([200]) - - # payload = open_json('tests/json/globomap/vip.json') - # self.globomap_client.update_element_state( - # 'CREATE', 'collections', 'vip', payload, None - # ) - # self._assert_request_called( - # requests_mock, - # 'POST', - # 'http://localhost:8080/collections/vip/', - # {'Content-Type': 'application/json'}, - # payload - # ) + def test_create_element(self): + requests_mock = self._mock_request([200]) + + payload = open_json('tests/json/globomap/vip.json') + self.globomap_client.update_element_state( + 'CREATE', 'collections', 'vip', payload, None + ) + self._assert_request_called( + requests_mock, + 'POST', + 'http://localhost:8080/collections/vip/', + {'Content-Type': 'application/json'}, + payload + ) # def test_create_element_expect_exception(self): # with self.assertRaises(GloboMapException):