Skip to content

Commit

Permalink
Test for multiple objects for class-based as_of
Browse files Browse the repository at this point in the history
  • Loading branch information
macro1 committed Aug 1, 2014
1 parent 887d44d commit 7bfb406
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions simple_history/tests/tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,9 @@ def test_create_and_delete(self):
doc_change.save()
docs_as_of_tmw = models.Document.history.as_of(now + timedelta(days=1))
self.assertFalse(list(docs_as_of_tmw))

def test_multiple(self):
document1 = models.Document.objects.create()
document2 = models.Document.objects.create()
historical = models.Document.history.as_of(datetime.now() + timedelta(days=1))
self.assertEqual(list(historical), [document1, document2])

0 comments on commit 7bfb406

Please sign in to comment.