Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def testFailWithoutCredentials(self):
""" Instance creation should fail, because we're leaving out a
credential
"""
with self.assertRaises(z.ze.MissingCredentials):
z.Zotero("myuserID")
def testTooManyItems(self):
""" Should fail because we're passing too many items
"""
itms = [i for i in range(51)]
zot = z.Zotero("myuserID", "user", "myuserkey")
with self.assertRaises(z.ze.TooManyItems):
zot.create_items(itms)