Ejemplo n.º 1
0
 def test_with_changed_attr(self):
     article = self.Article(title='Some title')
     assert has_changes(article, exclude=['id'])
     assert not has_changes(article, exclude=['title'])
Ejemplo n.º 2
0
 def test_without_changed_attr(self):
     article = self.Article()
     assert not has_changes(article, exclude=['id'])
Ejemplo n.º 3
0
 def test_with_changed_attr(self):
     article = self.Article(title='Some title')
     assert has_changes(article, ['title', 'id'])
Ejemplo n.º 4
0
 def test_without_changed_attr(self):
     article = self.Article()
     assert not has_changes(article, ['title'])
Ejemplo n.º 5
0
 def test_with_changed_attr(self, Article):
     article = Article(title='Some title')
     assert has_changes(article, 'title')
Ejemplo n.º 6
0
 def test_without_changed_attr(self, Article):
     article = Article()
     assert not has_changes(article, 'title')