diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2017-11-21 02:13:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-11-21 02:13:12 +0000 |
commit | b8c925baa4f00185d5465e6f85ebce832c0c41f6 (patch) | |
tree | 8d96b1e2d47cd6b55433e97fe3c4760f9d2e4398 /testapi/opnfv_testapi/tests/unit | |
parent | 4dced360ffbde66755ec49715db8fd876fa11d09 (diff) | |
parent | 141e16fcbdcacc02ff30d861bf76082b51d4c287 (diff) |
Merge "Update and Delete functionalities for projects"
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit')
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/handlers/test_base.py | 3 | ||||
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/handlers/test_project.py | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/handlers/test_base.py b/testapi/opnfv_testapi/tests/unit/handlers/test_base.py index eb147cc..4e5c0d9 100644 --- a/testapi/opnfv_testapi/tests/unit/handlers/test_base.py +++ b/testapi/opnfv_testapi/tests/unit/handlers/test_base.py @@ -61,7 +61,8 @@ class TestBase(testing.AsyncHTTPTestCase): 'opnfv-testapi-users', 'opnfv-gerrit-functest-submitters', 'opnfv-gerrit-qtip-submitters', - 'opnfv-gerrit-qtip-contributors'] + 'opnfv-gerrit-qtip-contributors', + 'opnfv-gerrit-apex-submitters'] }) def tearDown(self): diff --git a/testapi/opnfv_testapi/tests/unit/handlers/test_project.py b/testapi/opnfv_testapi/tests/unit/handlers/test_project.py index 2873ab0..9bc0e86 100644 --- a/testapi/opnfv_testapi/tests/unit/handlers/test_project.py +++ b/testapi/opnfv_testapi/tests/unit/handlers/test_project.py @@ -110,21 +110,25 @@ class TestProjectUpdate(TestProjectBase): def test_withoutBody(self): return None, 'noBody' + @executor.mock_valid_lfid() @executor.update(httplib.NOT_FOUND, message.not_found_base) def test_notFound(self): return self.req_e, 'notFound' + @executor.mock_valid_lfid() @executor.update(httplib.FORBIDDEN, message.exist_base) def test_newNameExist(self): return self.req_e, self.req_d.name + @executor.mock_valid_lfid() @executor.update(httplib.FORBIDDEN, message.no_update()) def test_noUpdate(self): return self.req_d, self.req_d.name + @executor.mock_valid_lfid() @executor.update(httplib.OK, '_assert_update') def test_success(self): - req = project_models.ProjectUpdateRequest('newName', 'new description') + req = project_models.ProjectUpdateRequest('apex', 'apex test') return req, self.req_d.name def _assert_update(self, req, body): @@ -145,6 +149,7 @@ class TestProjectDelete(TestProjectBase): def test_notFound(self): return 'notFound' + @executor.mock_valid_lfid() @executor.delete(httplib.OK, '_assert_delete') def test_success(self): return self.req_d.name |