Hosted site's Month/Year tags are no longer deletable

https://github.com/photo/frontend/issues/1468
This commit is contained in:
sneakypete81 2014-04-12 21:49:40 +01:00
parent 209a1da27c
commit b96df0a188

View file

@ -84,9 +84,11 @@ class TestBase(unittest.TestCase):
self.photos = self.client.photos.list() self.photos = self.client.photos.list()
self.tags = self.client.tags.list() self.tags = self.client.tags.list()
if (len(self.tags) != 1 or tag_ids = [tag.id for tag in self.tags]
self.tags[0].id != self.TEST_TAG or tag_counts = [tag.count for tag in self.tags]
str(self.tags[0].count) != "3"): if (len(tag_ids) != 3 or
self.TEST_TAG not in tag_ids or
tag_counts != [3, 3, 3]):
if self.debug: if self.debug:
print("[Regenerating Tags]") print("[Regenerating Tags]")
else: else:
@ -96,7 +98,7 @@ class TestBase(unittest.TestCase):
self._create_test_photos() self._create_test_photos()
self.photos = self.client.photos.list() self.photos = self.client.photos.list()
self.tags = self.client.tags.list() self.tags = self.client.tags.list()
if len(self.tags) != 1: if len(self.tags) != 3:
print("Tags: %s" % self.tags) print("Tags: %s" % self.tags)
raise Exception("Tag creation failed") raise Exception("Tag creation failed")