Skip to content

Commit ca2f92e

Browse files
author
Ramya Virajamangala
committed
Updated name of the list resource_type to resource_types and line 646 in osf_api.py
1 parent 6df9792 commit ca2f92e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

api/osf_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ def create_preprint(
643643
# then the Edit Preprint page thinks that the preprint has unsaved changes even if
644644
# you have made no changes on the form page. There is a ticket for this issue:
645645
# ENG-3782.
646-
current_year = datetime.now().year
646+
current_year = datetime.datetime.now().year
647647
# Get subject id for the subject_name parameter. NOTE: Currently we are creating
648648
# the preprint with only a single subject, which is the minimum required to publish.
649649
subject_id = get_subject_id_for_provider(

tests/test_registration_sidebar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ def registration_details_page(self, driver, registration_guid):
9797
registration_details_page.goto()
9898
return registration_details_page
9999

100-
resource_type = ['Data', 'Analytic Code', 'Materials', 'Papers', 'Supplements']
101-
102100
@pytest.fixture()
103101
def registration_details_page_with_resource(
104102
self, driver, registration_guid, resource_type
@@ -127,7 +125,9 @@ def create_new_resource(
127125
registration_details_page.preview_button.click()
128126
registration_details_page.resource_type_add_button.click()
129127

130-
@pytest.mark.parametrize('resource_type', resource_type)
128+
resource_types = ['Data', 'Analytic Code', 'Materials', 'Papers', 'Supplements']
129+
130+
@pytest.mark.parametrize('resource_type', resource_types)
131131
def test_add_new_resource(
132132
self, driver, registration_details_page, registration_guid, resource_type
133133
):
@@ -163,7 +163,7 @@ def test_add_new_resource(
163163
assert data_resource is not None
164164
osf_api.delete_registration_resource(registration_guid)
165165

166-
@pytest.mark.parametrize('resource_type', resource_type)
166+
@pytest.mark.parametrize('resource_type', resource_types)
167167
def test_edit_resource(
168168
self,
169169
driver,
@@ -189,7 +189,7 @@ def test_edit_resource(
189189
)
190190
osf_api.delete_registration_resource(registration_guid)
191191

192-
@pytest.mark.parametrize('resource_type', resource_type)
192+
@pytest.mark.parametrize('resource_type', resource_types)
193193
def test_delete_resource(
194194
self,
195195
driver,

0 commit comments

Comments
 (0)