def test_add_tag(self, user): user = user.get() article = Article(user.profile, 'title', 'some body', description='some', isPublished='True') article.save() t = Tags(tagname='python') t1 = Tags(tagname='flask') assert article.add_tag(t) assert article.add_tag(t1) assert len(article.tagList) == 2
def test_add_tag(self, user): user = user.get() article = Article(user.profile, "title", "some body", description="some") article.save() t = Tags(tagname="python") t1 = Tags(tagname="flask") assert article.add_tag(t) assert article.add_tag(t1) assert len(article.tagList) == 2
def test_remove_tag(self, user): user = user.get() article = Article(user.profile, 'title', 'some body', description='some') article.save() t1 = Tags(tagname='flask') assert article.add_tag(t1) assert article.remove_tag(t1) assert len(article.tagList) == 0