10 Commits

Author SHA1 Message Date
Athanasius
30bc05cf29
tests: Move to loading test messages from files
* Implement a new fixture `eddn_message_from_file()` for testing this.
  Eventually this will get renamed to `eddn_message()`.

* Files containing one message each go under `tests/eddn_message`, with
  sub-directories for `<schema>/<version>[/<event>]` and then the filename
  is the nature of that file in that context.

  Completely invalid files, i.e. not even valid JSON, can be placed in
  the top level of `tests/eddn_message`.

* Use this for the `parse_and_error_handle()` "valid journal/1 scan" test.
2022-08-29 17:08:03 +01:00
Athanasius
fa8952d0d5
tests: Comment out test_messages sections 2022-08-29 16:58:07 +01:00
Athanasius
3f5c2bff7f
tests: Gateway: Add commodity/3 test message & use against parse_and_error_handle() 2022-08-29 16:53:07 +01:00
Athanasius
a23491f73f
tests: Rename Gateway.handle_upload() test & move bottle.response mock to conftest.py fixture
Gateway.handle_upload: Rename function to include 'valid'
2022-08-29 16:10:16 +01:00
Athanasius
b4deb19e6e
tests: Move fixtures to conftest.py, and use in all existing applicable tests 2022-08-29 16:04:18 +01:00
Athanasius
0fed222074
tests/conftest: Fix up whitespace 2022-08-19 17:27:25 +01:00
Athanasius
73cdcc4c60
tests: Move 'plain_no_softwarename' message into conftest.py 2022-08-19 17:21:59 +01:00
Athanasius
4b6f22d9fd
tests: Move 'plain_outdated_schema' message into conftest.py 2022-08-19 17:19:56 +01:00
Athanasius
660dad4ff0
tests/conftest: Add 'invalid_json' message 2022-08-19 17:12:35 +01:00
Athanasius
30282ba95e
tests/conftest: pytest top-level configuration, mostly Fixtures
* `eddn_message()` fixture, set up to return a method when used, such that
  *that* can be called with a key to look up the approproiate test message.
* `test_messages` dictionary to support that.
2022-08-19 15:01:43 +01:00