You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env python2.7
import unittest
if __name__ == "__main__":
suite = unittest.TestLoader().discover('tests')
unittest.TextTestRunner(verbosity=2).run(suite)
./tests/testApi.py
from flask.ext.testing import TestCase
class TestApi(TestCase):
def create_app(self):
app = Flask(__name__)
app.config['TESTING'] = True
return app
def test_server_is_up_and_running(self):
pass
> ./tests.py
test_helloworld (testHelloWorld.TestHelloWorld) ... ok
Traceback (most recent call last):
File "./tests.py", line 6, in <module>
unittest.TextTestRunner(verbosity=2).run(suite)
File "/usr/lib/python2.7/unittest/runner.py", line 151, in run
test(result)
File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
test(result)
File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
test(result)
File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
test(result)
File "/home/bhafichuk/.virtualenvs/kyc/local/lib/python2.7/site-packages/flask_testing/utils.py", line 90, in __call__
self._post_teardown()
File "/home/bhafichuk/.virtualenvs/kyc/local/lib/python2.7/site-packages/flask_testing/utils.py", line 116, in _post_teardown
if self._ctx is not None:
AttributeError: 'TestApi' object has no attribute '_ctx'
The text was updated successfully, but these errors were encountered:
This is probably related to the change in #24.
Using python 2.7.5 and Flask-Testing==0.4.1
tests.py
./tests/testApi.py
> ./tests.py
The text was updated successfully, but these errors were encountered: