예제 #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'])
예제 #2
0
 def test_without_changed_attr(self):
     article = self.Article()
     assert not has_changes(article, exclude=['id'])
예제 #3
0
 def test_with_changed_attr(self):
     article = self.Article(title='Some title')
     assert has_changes(article, ['title', 'id'])
예제 #4
0
 def test_without_changed_attr(self):
     article = self.Article()
     assert not has_changes(article, ['title'])
예제 #5
0
 def test_with_changed_attr(self, Article):
     article = Article(title='Some title')
     assert has_changes(article, 'title')
예제 #6
0
 def test_without_changed_attr(self, Article):
     article = Article()
     assert not has_changes(article, 'title')