Page MenuHomeSoftware Heritage
Paste P652

pytest-django pytest-flask client fixture issue
ActivePublic

Authored by anlambert on Apr 23 2020, 2:21 PM.
_________________________________________________________________________ ERROR at setup of test_origin_save_metrics __________________________________________________________________________
file /home/antoine/swh/swh-environment/swh-web/swh/web/tests/misc/test_metrics.py, line 34
@pytest.mark.django_db
def test_origin_save_metrics(client):
file /home/antoine/.virtualenvs/swh/lib/python3.7/site-packages/pytest_flask/plugin.py, line 132
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
E fixture 'app' not found
> available fixtures: _configure_application, _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _monkeypatch_response_class, _push_request_context, _skip_sensitive, _template_string_if_invalid_marker, _testinfra_host, _verify_url, accept_any, accept_json, accept_jsonp, accept_mimetype, admin_client, admin_user, api_client, api_request_factory, archive_data, base_url, cache, capabilities, capfd, capfdbinary, caplog, capsys, capsysbinary, celery_app, celery_config, celery_enable_logging, celery_includes, celery_parameters, celery_session_app, celery_session_worker, celery_worker, celery_worker_parameters, celery_worker_pool, chrome_options, client, client_class, config, consumer, cov, datadir, db, depends_on_current_app, django_assert_max_num_queries, django_assert_num_queries, django_cache_cleared, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, driver, driver_args, driver_class, driver_kwargs, driver_log, driver_path, event_loop, firefox_options, firefox_path, firefox_profile, flask_app_client, host, indexer_data, kafka_consumer_group, kafka_prefix, kafka_server, live_server, mailoutbox, metadata, mocker, monkeypatch, no_cover, postgresql, postgresql_nooproc, postgresql_proc, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, request_ctx, request_factory, requests_mock, requests_mock_datadir, requests_mock_datadir_visits, rf, selenium, sensitive_url, session_capabilities, session_tmpdir_path, settings, swh_rpc_adapter, swh_rpc_client, test_config, tests_data, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpdir_path, transactional_db, unused_tcp_port, unused_tcp_port_factory, use_celery_app_trap, variables, worker_id
> use 'pytest --fixtures [testpath]' for help on them.
/home/antoine/.virtualenvs/swh/lib/python3.7/site-packages/pytest_flask/plugin.py:132