X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Ftests%2Ftest_admin_topics.py;h=2c8154e7cb199f2d38acaf0f7b3663531a9dad47;hp=a26d57627e2a7eac8e2e9fe44ea6ef8b9e0b91ef;hb=deba68eb04ae450a54ef73923f8034d07707a791;hpb=02e700c9eceb147f4c72c8fe18975bfaac6ec759 diff --git a/osm_nbi/tests/test_admin_topics.py b/osm_nbi/tests/test_admin_topics.py index a26d576..2c8154e 100755 --- a/osm_nbi/tests/test_admin_topics.py +++ b/osm_nbi/tests/test_admin_topics.py @@ -481,6 +481,7 @@ class Test_UserTopicAuth(TestCase): new_name = "other-user-name" new_prms = [{}] self.auth.get_role_list.side_effect = [[user], []] + self.auth.get_user_list.side_effect = [[user]] with self.assertRaises(EngineException, msg="Accepted wrong project-role mappings") as e: self.topic.edit(self.fake_session, uid, {"username": new_name, "project_role_mappings": new_prms}) self.assertEqual(e.exception.http_code, HTTPStatus.UNPROCESSABLE_ENTITY, "Wrong HTTP status code") @@ -698,6 +699,7 @@ class Test_CommonVimWimSdn(TestCase): self.assertEqual(operation["detailed-status"], "", "Wrong operation detailed status info") self.assertIsNone(operation["operationParams"], "Wrong operation parameters") with self.subTest(i=2): + self.db.get_one.side_effect = [cvws] with self.assertRaises(EngineException, msg="Accepted wrong property") as e: self.topic.edit(self.fake_session, str(uuid4()), {"name": "new-name", "extra_prop": "anything"}) self.assertEqual(e.exception.http_code, HTTPStatus.UNPROCESSABLE_ENTITY, "Wrong HTTP status code")