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