X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Ftests%2Ftest_admin_topics.py;h=8124ce42b7d1ea5290320fc968fc3a173be67b23;hp=734a2896ad81c835f08ae8918dafa48bb280eea6;hb=a9a1fc8427db17f47ea7ff782e35d24be4094f95;hpb=ee31f53e40fd2435bf19c394842693ae0eb72a9e diff --git a/osm_nbi/tests/test_admin_topics.py b/osm_nbi/tests/test_admin_topics.py index 734a289..8124ce4 100755 --- a/osm_nbi/tests/test_admin_topics.py +++ b/osm_nbi/tests/test_admin_topics.py @@ -999,6 +999,22 @@ class Test_UserTopicAuth(TestCase): norm(str(e.exception)), "Wrong exception text", ) + with self.subTest(i=3): + self.auth.get_user_list.side_effect = [[user], []] + self.auth.get_user.return_value = user + old_password = self.test_name + new_pasw = "new-password" + self.topic.edit( + self.fake_session, + uid, + { + "old_password": old_password, + "password": new_pasw, + }, + ) + content = self.auth.update_user.call_args[0][0] + self.assertEqual(content["old_password"], old_password, "Wrong old password") + self.assertEqual(content["password"], new_pasw, "Wrong user password") def test_delete_user(self): with self.subTest(i=1):