Skip to content

Instantly share code, notes, and snippets.

@EnTeQuAk

EnTeQuAk/tests.py

Created May 31, 2016
Embed
What would you like to do?
def test_webextension_generate_guid_no_error_on_deleted_addon(self):
addon = Addon.from_upload(
self.get_upload('webextension_no_id.xpi'),
[self.platform])
assert addon.guid is not None
addon.guid = None
addon.save()
addon = Addon.from_upload(
self.get_upload('webextension_no_id.xpi'),
[self.platform])
assert addon.guid is not None
# Uploading the same addon without a id works.
new_addon = Addon.from_upload(
self.get_upload('webextension_no_id.xpi'),
[self.platform])
assert new_addon.guid is not None
assert new_addon.guid != addon.guid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment