##// END OF EJS Templates
oss-licenses: Remove unused pytest fixture from tests.
Martin Bornhold -
r221:1cb0de52 default
parent child Browse files
Show More
@@ -461,10 +461,10 b' class TestLabsSettings(object):'
461 @pytest.mark.usefixtures('app')
461 @pytest.mark.usefixtures('app')
462 class TestOpenSourceLicenses(object):
462 class TestOpenSourceLicenses(object):
463
463
464 def _get_url(self, request):
464 def _get_url(self):
465 return ADMIN_PREFIX + '/settings/open_source'
465 return ADMIN_PREFIX + '/settings/open_source'
466
466
467 def test_records_are_displayed(self, autologin_user, request_stub):
467 def test_records_are_displayed(self, autologin_user):
468 sample_licenses = {
468 sample_licenses = {
469 "python2.7-pytest-2.7.1": {
469 "python2.7-pytest-2.7.1": {
470 "UNKNOWN": None
470 "UNKNOWN": None
@@ -477,7 +477,7 b' class TestOpenSourceLicenses(object):'
477 'rhodecode.admin.views.read_opensource_licenses',
477 'rhodecode.admin.views.read_opensource_licenses',
478 return_value=sample_licenses)
478 return_value=sample_licenses)
479 with read_licenses_patch:
479 with read_licenses_patch:
480 response = self.app.get(self._get_url(request_stub), status=200)
480 response = self.app.get(self._get_url(), status=200)
481
481
482 assert_response = AssertResponse(response)
482 assert_response = AssertResponse(response)
483 assert_response.element_contains(
483 assert_response.element_contains(
@@ -487,15 +487,14 b' class TestOpenSourceLicenses(object):'
487 for license in sample_licenses[name]:
487 for license in sample_licenses[name]:
488 assert_response.element_contains('.panel-body', license)
488 assert_response.element_contains('.panel-body', license)
489
489
490 def test_records_can_be_read(self, autologin_user, request_stub):
490 def test_records_can_be_read(self, autologin_user):
491 response = self.app.get(self._get_url(request_stub), status=200)
491 response = self.app.get(self._get_url(), status=200)
492 assert_response = AssertResponse(response)
492 assert_response = AssertResponse(response)
493 assert_response.element_contains(
493 assert_response.element_contains(
494 '.panel-heading', 'Licenses of Third Party Packages')
494 '.panel-heading', 'Licenses of Third Party Packages')
495
495
496 def test_forbidden_when_normal_user(self, autologin_regular_user,
496 def test_forbidden_when_normal_user(self, autologin_regular_user):
497 request_stub):
497 self.app.get(self._get_url(), status=403)
498 self.app.get(self._get_url(request_stub), status=403)
499
498
500
499
501 @pytest.mark.usefixtures("app")
500 @pytest.mark.usefixtures("app")
General Comments 0
You need to be logged in to leave comments. Login now