Skip to content

Commit

Permalink
Merge pull request #702 from tj-django/chore/test-m2m-clone
Browse files Browse the repository at this point in the history
chore: test m2m clone
  • Loading branch information
repo-ranger[bot] authored Nov 17, 2022
2 parents 38c6d49 + 5d99e73 commit c6598d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions model_clone/tests/test_clone_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ def test_cloning_without_explicit_clone_m2m_fields(self):
list(book.authors.values_list("first_name", "last_name")),
list(book_clone.authors.values_list("first_name", "last_name")),
)
self.assertEqual(
len(list(book_clone.authors.values_list("first_name", "last_name"))), 0
)

def test_cloning_with_unique_constraint_is_valid(self):
sale_tag = SaleTag.objects.create(name="test-sale-tag")
Expand Down

0 comments on commit c6598d8

Please sign in to comment.