Skip to content
Snippets Groups Projects
Commit 8d9a6775 authored by anonymous's avatar anonymous
Browse files

add test for first upload step

parent 1b892656
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ class TestUpload(helpers.FunctionalTestBase): ...@@ -75,7 +75,7 @@ class TestUpload(helpers.FunctionalTestBase):
response6.mustcontain('odsh_temporal_start_not_date_error_label') response6.mustcontain('odsh_temporal_start_not_date_error_label')
@odsh_test() @odsh_test()
def test_upload_license_without_attribution_text(self): def test_upload_all_fields_set(self):
# arrange # arrange
form = self._get_package_new_form() form = self._get_package_new_form()
form['title'] = 'Titel' form['title'] = 'Titel'
...@@ -88,15 +88,13 @@ class TestUpload(helpers.FunctionalTestBase): ...@@ -88,15 +88,13 @@ class TestUpload(helpers.FunctionalTestBase):
form[self._get_field_name('temporal_start')] = '2019-01-29' form[self._get_field_name('temporal_start')] = '2019-01-29'
form[self._get_field_name('temporal_end')] = '2019-02-02' form[self._get_field_name('temporal_end')] = '2019-02-02'
form['license_id'] = 'http://dcat-ap.de/def/licenses/dl-zero-de/2.0' form['license_id'] = 'http://dcat-ap.de/def/licenses/dl-zero-de/2.0'
form[self._get_field_name('licenseAttributionByText')].value = 'text'
# act # act
print(form)
form[self._get_field_key('licenseAttributionByText')
] = 'licenseAttributionByText'
form[self._get_field_name('licenseAttributionByText')] = None
response = self._submit_and_follow_form(form) response = self._submit_and_follow_form(form)
# assert # assert
response.mustcontain('odsh_spatial_uri_unknown_error_label') assert_true('resource-edit' in response.forms)
def _get_field_name(self, field): def _get_field_name(self, field):
checksum = odsh_create_checksum(field) checksum = odsh_create_checksum(field)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment