summaryrefslogtreecommitdiff
path: root/py-fake-service/app/adapter/tag.py
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-08-12 13:30:24 -0300
committerDuda Dornelles <ddornell@thoughtworks.com>2014-08-12 13:30:24 -0300
commite7db94a986f411e1a86b9a6cc2af21a7e74e1fcf (patch)
tree862e3ed30e31cdabffd4e85eb7e6af323585f106 /py-fake-service/app/adapter/tag.py
parent275e153af3bd5546525ad77b906e34539d70d351 (diff)
adding mails query, tags and contacts to py-fake-service
Diffstat (limited to 'py-fake-service/app/adapter/tag.py')
-rw-r--r--py-fake-service/app/adapter/tag.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/py-fake-service/app/adapter/tag.py b/py-fake-service/app/adapter/tag.py
new file mode 100644
index 00000000..bc98669d
--- /dev/null
+++ b/py-fake-service/app/adapter/tag.py
@@ -0,0 +1,17 @@
+class Tag:
+ DEFAULT_TAGS = ["inbox", "sent", "trash", "drafts"]
+
+ def __init__(self, name, ident):
+ self.counts = {
+ 'total': 1,
+ 'read': 0,
+ 'starred': 0,
+ 'reply': 0
+ }
+
+ self.ident = ident
+ self.name = name
+ self.default = name in self.DEFAULT_TAGS
+
+ def increment_count(self):
+ self.counts['total'] += 1