Skip to content

Commit

Permalink
adding a test for if its None
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed May 26, 2017
1 parent ba14ae2 commit f4de141
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions opal/tests/test_models_mixins.py
Expand Up @@ -172,6 +172,12 @@ def test_get_lookup_list_uses_api_name(self):
self.assertEqual(result, "hound")
get_api_name.assert_called_once_with()

def test_get_lookup_list_api_name_when_none(self):
# when we're not in a M2M field or a FK or FT field then
# then we should just return None
result = test_models.HoundOwner.get_lookup_list_api_name("name")
self.assertIsNone(result)


class ToDictMixinTestCase(OpalTestCase):
def setUp(self):
Expand Down

0 comments on commit f4de141

Please sign in to comment.