Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
32846c39
Commit
32846c39
authored
Jan 14, 2021
by
Markus Scheidgen
Browse files
Moved app_fastapi to app.
parent
aa321ca9
Changes
76
Hide whitespace changes
Inline
Side-by-side
tests/app
_fastapi
/flask/test_dcat.py
→
tests/app/flask/test_dcat.py
View file @
32846c39
...
...
@@ -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'
)
...
...
tests/app
_fastapi
/flask/utils.py
→
tests/app/flask/utils.py
View file @
32846c39
File moved
tests/app
_fastapi
/routers/__init__.py
→
tests/app/routers/__init__.py
View file @
32846c39
File moved
tests/app
_fastapi
/routers/common.py
→
tests/app/routers/common.py
View file @
32846c39
File moved
tests/app
_fastapi
/routers/test_auth.py
→
tests/app/routers/test_auth.py
View file @
32846c39
File moved
tests/app
_fastapi
/routers/test_datasets.py
→
tests/app/routers/test_datasets.py
View file @
32846c39
File moved
tests/app
_fastapi
/routers/test_entries.py
→
tests/app/routers/test_entries.py
View file @
32846c39
...
...
@@ -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
...
...
tests/app
_fastapi
/routers/test_users.py
→
tests/app/routers/test_users.py
View file @
32846c39
File moved
tests/app
_fastapi
/test_optimade.py
→
tests/app/test_optimade.py
View file @
32846c39
...
...
@@ -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
)
...
...
tests/app
_fastapi
/test_utils.py
→
tests/app/test_utils.py
View file @
32846c39
...
...
@@ -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
...
...
tests/normalizing/test_system.py
View file @
32846c39
...
...
@@ -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
...
...
tests/parsing/test_parsing.py
View file @
32846c39
...
...
@@ -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'
),
...
...
tests/processing/test_data.py
View file @
32846c39
...
...
@@ -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
):
...
...
tests/test_cli.py
View file @
32846c39
...
...
@@ -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
...
...
tests/test_client.py
View file @
32846c39
...
...
@@ -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
...
...
tests/test_search.py
View file @
32846c39
...
...
@@ -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
):
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment