We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da66662 commit 45e1458Copy full SHA for 45e1458
1 file changed
tests/rw_functional.py
@@ -959,3 +959,17 @@ def test16ModifyTags(self):
959
bz.update_tags(bug.id, tags_remove=bug.tags)
960
bug.refresh()
961
self.assertEqual(bug.tags, [])
962
+
963
+ def test17LoginAPIKey(self):
964
+ api_key = "somefakeapikey1234"
965
+ bz = self.bzclass(url=self.url, use_creds=False, api_key=api_key)
966
+ if bz.bz_ver_major < 5:
967
+ self.skipTest("can only test apikey on bugzilla 5+")
968
969
+ try:
970
+ self.assertTrue(bz.logged_in, False)
971
972
+ # Use this to trigger a warning about api_key
973
+ bz.createbug(bz.build_createbug())
974
+ except Exception as e:
975
+ self.assertTrue("The API key you specified is invalid" in str(e))
0 commit comments