diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-01-22 13:49:40 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-01-22 13:49:40 +0100 |
commit | 7218849ae2f43aee6b3462a30e07caf5bac3d22b (patch) | |
tree | 3de3b31c07e532edf7373faf4a267f313dc2ed25 /test/unit/test_payload_create.py | |
parent | 046b8a7b3e7259bf451926732e6221076b1d4153 (diff) | |
download | browser-extension-7218849ae2f43aee6b3462a30e07caf5bac3d22b.tar.gz browser-extension-7218849ae2f43aee6b3462a30e07caf5bac3d22b.zip |
add a mapping/resources installation dialog
Diffstat (limited to 'test/unit/test_payload_create.py')
-rw-r--r-- | test/unit/test_payload_create.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/test_payload_create.py b/test/unit/test_payload_create.py index 6a6cf2c..cee3a9b 100644 --- a/test/unit/test_payload_create.py +++ b/test/unit/test_payload_create.py @@ -118,19 +118,19 @@ def test_payload_create_normal_usage(driver, execute_in_page): def assert_db_contents(): db_contents = get_db_contents(execute_in_page) - assert uuidv4_re.match(db_contents['resources'][0]['uuid']) + assert uuidv4_re.match(db_contents['resource'][0]['uuid']) localid = f'local-{form_data["identifier"]}' long_name = form_data['long_name'] or form_data['identifier'] payloads = dict([(pat, {'identifier': localid}) for pat in form_data['patterns'].split('\n') if pat]) - assert db_contents['resources'] == [{ + assert db_contents['resource'] == [{ 'source_name': localid, 'source_copyright': [], 'type': 'resource', 'identifier': localid, - 'uuid': db_contents['resources'][0]['uuid'], + 'uuid': db_contents['resource'][0]['uuid'], 'version': [1], 'description': form_data['description'], 'dependencies': [], @@ -141,13 +141,13 @@ def test_payload_create_normal_usage(driver, execute_in_page): }] }] - assert uuidv4_re.match(db_contents['mappings'][0]['uuid']) - assert db_contents['mappings'] == [{ + assert uuidv4_re.match(db_contents['mapping'][0]['uuid']) + assert db_contents['mapping'] == [{ 'source_name': localid, 'source_copyright': [], 'type': 'mapping', 'identifier': localid, - 'uuid': db_contents['mappings'][0]['uuid'], + 'uuid': db_contents['mapping'][0]['uuid'], 'version': [1], 'description': form_data['description'], 'long_name': long_name, |