Ejemplo n.º 1
0
    def test_accessor(self):
        tag = Tag()

        tag.name = "xyz"
        eq_("xyz", tag.name)

        tag.color = "abc"
        eq_("abc", tag.color)
Ejemplo n.º 2
0
 def test_readonly_id(self):
     tag = Tag()
     tag.id = 0
Ejemplo n.º 3
0
 def test_readonly_user_count(self):
     tag = Tag()
     tag.tagged_user_count = 0
Ejemplo n.º 4
0
 def test_readonly_segment(self):
     tag = Tag()
     tag.segment = "xyz"
Ejemplo n.º 5
0
 def test_write_tag_or_untag(self):
     tag = Tag()
     tag.tag_or_untag = "tag"
     eq_('tag', tag['tag_or_untag'])
Ejemplo n.º 6
0
 def test_writeonly_tag_or_untag(self):
     tag = Tag()
     tag.tag_or_untag
Ejemplo n.º 7
0
 def test_write_user_ids(self):
     tag = Tag()
     tag.user_ids = ["abc123"]
     eq_(["abc123"], tag['user_ids'])
Ejemplo n.º 8
0
def test_write_user_ids():
    tag = Tag()
    tag.user_ids = ["abc123"]
    eq_(tag['user_ids'], ["abc123"])
Ejemplo n.º 9
0
 def test_write_emails(self):
     tag = Tag()
     tag.emails = ["*****@*****.**"]
     eq_(["*****@*****.**"], tag['emails'])
Ejemplo n.º 10
0
 def test_writeonly_emails(self):
     tag = Tag()
     tag.emails
Ejemplo n.º 11
0
def test_accessor():
    tag = Tag()
    tag.name = "xyz"
    eq_(tag.name, "xyz")
Ejemplo n.º 12
0
def test_segment():
    tag = Tag(segment="segment")
    tag.segment
Ejemplo n.º 13
0
def test_readonly_segment():
    tag = Tag()
    tag.segment = "segment"
Ejemplo n.º 14
0
def test_write_tag_or_untag():
    tag = Tag()
    tag.tag_or_untag = "tag"
    eq_(tag['tag_or_untag'], "tag")
Ejemplo n.º 15
0
 def test_writeonly_user_ids(self):
     tag = Tag()
     tag.user_ids
Ejemplo n.º 16
0
 def test_update(self):
     tag = Tag()
     tag.save()
     eq_(None, tag.id)
     eq_('green', tag.color)
Ejemplo n.º 17
0
def test_write_emails():
    tag = Tag()
    tag.emails = ["*****@*****.**"]
    eq_(tag['emails'], ["*****@*****.**"])