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
354846a4
Unverified
Commit
354846a4
authored
Mar 13, 2017
by
David Haynes
Browse files
Test against the error code returned by the error instead
- 1406: data too long
parent
fa11c3c4
Pipeline
#1081
failed with stage
in 1 minute and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go/go/test_models.py
View file @
354846a4
...
...
@@ -62,7 +62,10 @@ class RegisteredUserTest(TestCase):
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
"""
# self.assertRaises(DataError, get_registered_user.save())
try
:
get_registered_user
.
save
()
except
DataError
as
ex
:
self
.
assertEqual
(
str
(
ex
[
0
]),
"1406"
)
# blank=False is purely form validation related
...
...
@@ -99,7 +102,7 @@ class RegisteredUserTest(TestCase):
try
:
get_registered_user
.
save
()
except
DataError
as
ex
:
print
(
ex
)
self
.
assertEqual
(
str
(
ex
[
0
]),
"1406"
)
# 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