Skip to content

Commit

Permalink
Add tests for swapper.split with contrib app
Browse files Browse the repository at this point in the history
  • Loading branch information
blag committed Apr 24, 2017
1 parent 8f6634f commit bfd0473
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_swapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def test_not_installed(self):
def test_non_contrib_app_split(self):
self.assertEqual(swapper.split('alt_app.Type'), ('alt_app', 'Type'))

def test_contrib_app_split(self):
self.assertEqual(
swapper.split('alt_app.contrib.named_things.NamedThing'),
('alt_app.contrib.named_things', 'NamedThing'))

# Tests that only work if default_app.Type is swapped
@unittest.skipUnless(settings.SWAP, "requires swapped models")
def test_swap_setting(self):
Expand Down

0 comments on commit bfd0473

Please sign in to comment.