Unverified Commit 9a347518 authored by David Haynes's avatar David Haynes
Browse files

Finish first pass of test_models

- everything has at least one test now
- 504 lines later
- tests are of pretty ok quality, can be fairly sure models is tested to
it's extent now
parent 215cca20
Pipeline #1093 failed with stage
in 1 minute and 10 seconds
......@@ -489,3 +489,15 @@ class URLTest(TestCase):
self.assertEqual(expected, actual)
# generate_valid_short -----------------------------------------------------
def test_generate_valid_short(self):
"""
Test that we can generate a short url at will
"""
# Get the URL to test
get_user = User.objects.get(username='dhaynes')
get_registered_user = RegisteredUser.objects.get(user=get_user)
current_url = URL.objects.get(owner=get_registered_user)
self.assertTrue(current_url.generate_valid_short())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment