[] - [] - [2018/04/04 17:07:48] - [myproj_api.api.handlers.generic] - [ERROR] - Unhandled Exception
Traceback (most recent call last):
File "/home/devuser/code/myproj/.venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/home/devuser/code/myproj/.venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/devuser/code/myproj/.venv/lib/python3.5/site-packages/stoplight/decorators.py", line 144, in wrapper
if _apply_rule(f, rule, param, getval) is not None:
File "/home/devuser/code/myproj/.venv/lib/python3.5/site-packages/stoplight/decorators.py", line 40, in _apply_rule
resp = rule.vfunc(value)
File "/home/devuser/code/myproj/.venv/lib/python3.5/site-packages/stoplight/decorators.py", line 173, in wrapper
func(value)
File "/home/devuser/code/myproj/myproj_api/api/validation/validators.py", line 39, in validate_id
raise ValidationFailed('Invalid ID {0}'.format(value))
File "/home/devuser/code/myproj/.venv/lib/python3.5/site-packages/stoplight/exceptions.py", line 7, in __init__
msg = msg.format(*args, **kwargs)
ValueError: Single '}' encountered in format string
diff --git a/stoplight/tests/test_validation.py b/stoplight/tests/test_validation.py
index 6fb6121..0b78c76 100644
--- a/stoplight/tests/test_validation.py
+++ b/stoplight/tests/test_validation.py
@@ -347,7 +347,8 @@ class TestValidationDecorator(TestCase):
negative_cases = [
'z', 'y', 'z',
'ww', 'vv', 'uu',
- 'serial', 'cereal', 'surreal'
+ 'serial', 'cereal', 'surreal',
+ '\}', '\{'
]
for case in positive_cases:
bmeyer@bmeyer:~/Development/other/stoplight$ tox -e py27
GLOB sdist-make: /home/bmeyer/Development/other/stoplight/setup.py
py27 inst-nodeps: /home/bmeyer/Development/other/stoplight/.tox/dist/stoplight-1.2.0.zip
py27 installed: coverage==4.5.1,extras==1.0.0,fixtures==3.0.0,linecache2==1.0.0,nose==1.3.7,pbr==4.0.1,pep8==1.7.1,python-mimeparse==1.6.0,six==1.11.0,stoplight==1.2.0,testtools==2.3.0,traceback2==1.4.0,unittest2==1.1.0
py27 runtests: PYTHONHASHSEED='1507695569'
py27 runtests: commands[0] | nosetests
ERROR: Dispatch function threw an exception.Bad callbackERROR: Dispatch function threw an exception.Bad callbackERROR: Dispatch function threw an exception.Bad callback.....F.......
======================================================================
FAIL: test_function_style_validation (stoplight.tests.test_validation.TestValidationDecorator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/bmeyer/Development/other/stoplight/stoplight/tests/test_validation.py", line 359, in test_function_style_validation
FunctionValidation(case)
AssertionError: RuntimeError not raised
Name Stmts Miss Branch BrPart Cover
----------------------------------------------------------------------
stoplight/__init__.py 62 0 4 0 100%
stoplight/decorators.py 87 0 30 0 100%
stoplight/exceptions.py 8 0 0 0 100%
stoplight/rule.py 21 0 2 0 100%
stoplight/tests/__init__.py 0 0 0 0 100%
stoplight/tests/test_validation.py 284 284 47 0 0%
----------------------------------------------------------------------
TOTAL 462 284 83 0 39%
nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%
ERROR: InvocationError: '/home/bmeyer/Development/other/stoplight/.tox/py27/bin/nosetests'
_________________________________________________________________________________ summary __________________________________________________________________________________
ERROR: py27: commands failed