Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
fcc9ceb6
Unverified
Commit
fcc9ceb6
authored
Mar 13, 2017
by
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
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
go/go/test_models.py
View file @
fcc9ceb6
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment