spdx-online-tools
spdx-online-tools copied to clipboard
Write tests for checking the archive request feature
` driver.find_element_by_id('unarchive_button' + str(archive_license_obj.id)).click()
driver.find_element_by_id('confirm_unarchive').click()
self.assertEquals(LicenseRequest.objects.get(id=archive_license_obj.id).archive, False)
if driver.find_element_by_id('unarchive_button' + str(archive_license_obj.id)):
driver.find_element_by_id('unarchive_button' + str(archive_license_obj.id)).click()
driver.find_element_by_id('confirm_unarchive').click()
self.assertEquals(LicenseRequest.objects.get(id=archive_license_obj.id).archive, False)
else:
pass`
The archive request feature is available only for those who are github logged in. Currently the tests for users who are github logged in and for those who are not are under the same function. We need to write different functions(test cases) for github logged in users and users are not github logged in.