Commit 32846c39 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Moved app_fastapi to app.

parent aa321ca9
......@@ -21,10 +21,10 @@ from datetime import datetime
from nomad import infrastructure, config
from nomad.datamodel import EntryMetadata
from nomad.app_fastapi.flask.dcat.mapping import Mapping
from nomad.app.flask.dcat.mapping import Mapping
from tests.conftest import clear_elastic
from tests.app_fastapi.flask.test_app import BlueprintClient
from tests.app.flask.test_app import BlueprintClient
@pytest.fixture(scope='session')
......
......@@ -23,12 +23,12 @@ import io
import json
from nomad.metainfo.search_extension import search_quantities
from nomad.app_fastapi.models import AggregateableQuantity, Metric
from nomad.app.models import AggregateableQuantity, Metric
from tests.utils import assert_at_least
from .common import assert_response
from tests.app_fastapi.conftest import example_data as data # pylint: disable=unused-import
from tests.app.conftest import example_data as data # pylint: disable=unused-import
'''
These are the tests for all API operations below ``entries``. The tests are organized
......
......@@ -21,7 +21,7 @@ import pytest
from nomad.processing import Upload
from nomad import search
from nomad.app_fastapi.optimade import parse_filter
from nomad.app.optimade import parse_filter
from tests.conftest import clear_elastic, clear_raw_files
......@@ -37,7 +37,7 @@ def test_get_entry(published: Upload):
def test_no_optimade(mongo, elastic, raw_files, client):
from tests.app_fastapi.flask.utils import Upload
from tests.app.flask.utils import Upload
upload = Upload()
upload.create_test_structure(1, 2, 1, [], 0)
upload.create_test_structure(2, 2, 1, [], 0, optimade=False)
......@@ -55,7 +55,7 @@ def example_structures(elastic_infra, mongo_infra, raw_files_infra):
clear_elastic(elastic_infra)
mongo_infra.drop_database('test_db')
from tests.app_fastapi.flask.utils import Upload
from tests.app.flask.utils import Upload
upload = Upload()
upload.create_test_structure(1, 2, 1, [], 0)
upload.create_test_structure(2, 2, 1, ['C'], 0)
......
......@@ -22,7 +22,7 @@ import zipfile
from nomad import config
from nomad.datamodel import EntryArchive, EntryMetadata
from nomad.app_fastapi.utils import create_streamed_zipfile, File
from nomad.app.utils import create_streamed_zipfile, File
from tests.conftest import clear_raw_files
from tests.test_files import create_test_upload_files
......
......@@ -20,7 +20,7 @@ import ase.build
from nomad import datamodel, config
from nomad.datamodel import EntryArchive
from nomad.app_fastapi.flask import dump_json
from nomad.app.flask import dump_json
from nomad.datamodel.metainfo.public import section_springer_material as SpringerMaterial
from tests.parsing.test_parsing import parsed_vasp_example # pylint: disable=unused-import
......
......@@ -27,7 +27,7 @@ from nomad import utils, files, datamodel
from nomad.datamodel import EntryArchive, EntryMetadata
from nomad.parsing import BrokenParser, Backend
from nomad.parsing.parsers import parser_dict, match_parser
from nomad.app_fastapi.flask import dump_json
from nomad.app.flask import dump_json
parser_examples = [
('parsers/random', 'test/data/parsers/random_0'),
......
......@@ -31,8 +31,8 @@ from nomad.processing.base import task as task_decorator, FAILURE, SUCCESS
from tests.test_search import assert_search_upload
from tests.test_files import assert_upload_files
from tests.app_fastapi.flask.conftest import client, oasis_central_nomad_client, session_client # pylint: disable=unused-import
from tests.app_fastapi.conftest import other_test_user_auth, test_user_auth # pylint: disable=unused-import
from tests.app.flask.conftest import client, oasis_central_nomad_client, session_client # pylint: disable=unused-import
from tests.app.conftest import other_test_user_auth, test_user_auth # pylint: disable=unused-import
def test_send_mail(mails, monkeypatch):
......
......@@ -28,10 +28,10 @@ from nomad.cli import cli
from nomad.cli.cli import POPO
from nomad.processing import Upload, Calc
from tests.app_fastapi.flask.test_app import BlueprintClient
from tests.app_fastapi.flask.conftest import ( # pylint: disable=unused-import
from tests.app.flask.test_app import BlueprintClient
from tests.app.flask.conftest import ( # pylint: disable=unused-import
test_user_bravado_client, client, session_client, admin_user_bravado_client) # pylint: disable=unused-import
from tests.app_fastapi.conftest import test_user_auth, admin_user_auth # pylint: disable=unused-import
from tests.app.conftest import test_user_auth, admin_user_auth # pylint: disable=unused-import
# TODO there is much more to test
......
......@@ -23,9 +23,9 @@ from nomad.metainfo import MSection, SubSection
from nomad.datamodel import EntryArchive, User
from nomad.datamodel.metainfo.public import section_run
from tests.app_fastapi.flask.conftest import client, session_client # pylint: disable=unused-import
from tests.app_fastapi.conftest import other_test_user_auth, test_user_auth # pylint: disable=unused-import
from tests.app_fastapi.flask.test_app import BlueprintClient
from tests.app.flask.conftest import client, session_client # pylint: disable=unused-import
from tests.app.conftest import other_test_user_auth, test_user_auth # pylint: disable=unused-import
from tests.app.flask.test_app import BlueprintClient
from tests.processing import test_data as test_processing
......
......@@ -25,7 +25,7 @@ import json
from nomad import datamodel, processing, infrastructure, config
from nomad.metainfo import search_extension
from nomad.search import entry_document, SearchRequest, search, flat
from nomad.app_fastapi.models import WithQuery
from nomad.app.models import WithQuery
def test_init_mapping(elastic):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment