From 8d9a6775aeb0feebe6cac40500ae3fe879fa3f0d Mon Sep 17 00:00:00 2001
From: anonymous <anonymous>
Date: Tue, 29 Jan 2019 13:50:58 +0100
Subject: [PATCH] add test for first upload step

---
 ckanext/odsh/tests/test_upload.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ckanext/odsh/tests/test_upload.py b/ckanext/odsh/tests/test_upload.py
index a434e1ec..949c383b 100644
--- a/ckanext/odsh/tests/test_upload.py
+++ b/ckanext/odsh/tests/test_upload.py
@@ -75,7 +75,7 @@ class TestUpload(helpers.FunctionalTestBase):
         response6.mustcontain('odsh_temporal_start_not_date_error_label')
 
     @odsh_test()
-    def test_upload_license_without_attribution_text(self):
+    def test_upload_all_fields_set(self):
         # arrange
         form = self._get_package_new_form()
         form['title'] = 'Titel'
@@ -88,15 +88,13 @@ class TestUpload(helpers.FunctionalTestBase):
         form[self._get_field_name('temporal_start')] = '2019-01-29'
         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[self._get_field_name('licenseAttributionByText')].value = 'text'
+
         # act
-        print(form)
-        form[self._get_field_key('licenseAttributionByText')
-             ] = 'licenseAttributionByText'
-        form[self._get_field_name('licenseAttributionByText')] = None
         response = self._submit_and_follow_form(form)
 
         # assert
-        response.mustcontain('odsh_spatial_uri_unknown_error_label')
+        assert_true('resource-edit' in response.forms)
 
     def _get_field_name(self, field):
         checksum = odsh_create_checksum(field)
-- 
GitLab