-
-
Save senaps/fbf05ca3d38d628f82d5301725a365c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.fixture() | |
def app(): | |
app = create_app(TestingConfig) | |
return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================================================================== test session starts ===================================================================== | |
platform linux2 -- Python 2.7.5, pytest-3.3.1, py-1.5.2, pluggy-0.6.0 | |
rootdir: /home/senaps/Projects/pers/flask-bare/code, inifile: | |
collected 4 items | |
tests/test_config.py ... [ 75%] | |
tests/test_main_bluprint.py E [100%] | |
=========================================================================== ERRORS =========================================================================== | |
___________________________________________________________ ERROR at setup of TestMain.test_index ____________________________________________________________ | |
file /home/senaps/Projects/pers/flask-bare/code/tests/test_main_bluprint.py, line 8 | |
def test_index(self, client): | |
E fixture 'client' not found | |
> available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_xml_property, recwarn, tmpdir, tmpdir_factory | |
> use 'pytest --fixtures [testpath]' for help on them. | |
/home/senaps/Projects/pers/flask-bare/code/tests/test_main_bluprint.py:8 | |
============================================================= 3 passed, 1 error in 0.02 seconds ================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestMain: | |
def test_index(self, client): | |
res = app.client.get(url_for('main.index')) | |
assert res.status_code == 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment