summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/pixelated/adapter/model/tag.py2
-rw-r--r--service/pixelated/adapter/services/tag_service.py2
-rw-r--r--service/test/integration/tags_test.py6
3 files changed, 6 insertions, 4 deletions
diff --git a/service/pixelated/adapter/model/tag.py b/service/pixelated/adapter/model/tag.py
index d75022f9..ca62a1fe 100644
--- a/service/pixelated/adapter/model/tag.py
+++ b/service/pixelated/adapter/model/tag.py
@@ -17,7 +17,7 @@
import json
-class Tag:
+class Tag(object):
@classmethod
def from_dict(cls, tag_dict):
diff --git a/service/pixelated/adapter/services/tag_service.py b/service/pixelated/adapter/services/tag_service.py
index c723b04c..22cfb051 100644
--- a/service/pixelated/adapter/services/tag_service.py
+++ b/service/pixelated/adapter/services/tag_service.py
@@ -19,7 +19,7 @@ from pixelated.adapter.model.tag import Tag
class TagService:
instance = None
- SPECIAL_TAGS = {Tag('inbox', True), Tag('sent', True), Tag('drafts', True), Tag('trash', True)}
+ SPECIAL_TAGS = {Tag('inbox', True), Tag('sent', True), Tag('drafts', True), Tag('trash', True), Tag('ALL', True)}
@classmethod
def extract_reserved(cls, tags):
diff --git a/service/test/integration/tags_test.py b/service/test/integration/tags_test.py
index 03d6f4b3..6072392c 100644
--- a/service/test/integration/tags_test.py
+++ b/service/test/integration/tags_test.py
@@ -16,6 +16,7 @@
import json
from test.support.integration import *
+from pixelated.adapter.services.tag_service import TagService
class TagsTest(SoledadTestBase):
@@ -45,8 +46,9 @@ class TagsTest(SoledadTestBase):
mail = MailBuilder().with_subject('Mail with tags').build_input_mail()
self.client.add_mail_to_inbox(mail)
- response = self.post_tags(mail.ident, self._tags_json(['DRAFTS']))
- self.assertEquals("None of the following words can be used as tags: drafts", response)
+ for tag in TagService.SPECIAL_TAGS:
+ response = self.post_tags(mail.ident, self._tags_json([tag.name.upper()]))
+ self.assertEquals("None of the following words can be used as tags: %s" % tag.name, response)
mail = self.client.mailboxes.inbox().mail(mail.ident)
self.assertNotIn('drafts', mail.tags)