Unverified Commit fcc9ceb6 authored by David Haynes's avatar David Haynes
Browse files

Find the assert we were looking for

- catch error thrown when tossing something too large into the DB
parent f7afa4fb
Pipeline #1079 failed with stage
in 54 seconds
......@@ -4,6 +4,7 @@ from __future__ import unicode_literals, absolute_import, print_function, divisi
# Django Imports
from django.test import TestCase
from django.contrib.auth.models import User
from django.db.utils import DataError
# App Imports
from go.models import URL, RegisteredUser
......@@ -61,8 +62,7 @@ class RegisteredUserTest(TestCase):
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
"""
# MYSQL will truncate the long string, no errors
self.assertFalse((bool)(get_registered_user.save()))
self.assertRaises(DataError, get_registered_user.save())
# blank=False is purely form validation related
......@@ -95,8 +95,7 @@ class RegisteredUserTest(TestCase):
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
"""
# MYSQL will truncate the long string, no errors
self.assertFalse((bool)(get_registered_user.save()))
self.assertRaises(DataError, get_registered_user.save())
# blank=False is purely form validation related
......
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