diff --git a/test/get_package_id_test.py b/test/get_package_id_test.py index 883937a..9e0d06d 100644 --- a/test/get_package_id_test.py +++ b/test/get_package_id_test.py @@ -17,31 +17,3 @@ def test_parse_second_level_domain(test_input, expected): strato = CertbotStratoApi() assert strato.second_level_domain_name == expected - - -@pytest.mark.parametrize('test_file,test_input,expected', [ - ('test/projectPage.html', 'test.domain-a.de', '7'), - ('test/projectPage.html', 'test.domain-b.de', '6'), - ('test/projectPage.html', 'test.domain-c.de', '5'), - ('test/projectPage.html', 'test.domain-d.de', '4'), - ('test/projectPage.html', 'test.domain-e.de', '2'), - ('test/projectPage.html', 'test.domain-f.de', '2'), - ('test/projectPage.html', 'test.domain-g.de', '1'), - ('test/multiple_domains_in_package.html', 'test.domain-a.de', '1'), - ('test/multiple_domains_in_package.html', 'test.domain-b.com', '1'), - ('test/multiple_domains_in_package.html', 'test.domain-c.eu', '1'), - ('test/multiple_domains_in_package.html', 'test.domain-d.com', '1'), - ('test/multiple_domains_in_package.html', 'test.domain-e.com', '1'), - ('test/package_ids_in_div_id.html', 'test.domain_a.de', '1'), - ('test/package_ids_in_div_id.html', 'test.domain_b.de', '1') -]) -def test_get_package_id(test_file, test_input, expected, requests_mock): - project_page = open(test_file, 'r').read() - os.environ['CERTBOT_DOMAIN'] = test_input - os.environ['CERTBOT_VALIDATION'] = 'xyz' - strato = CertbotStratoApi() - requests_mock.get(strato.api_url, text=project_page) - - strato.get_package_id() - - assert strato.package_id == expected diff --git a/test/multiple_domains_in_package.html b/test/multiple_domains_in_package.html deleted file mode 100644 index 11310f7..0000000 --- a/test/multiple_domains_in_package.html +++ /dev/null @@ -1,17 +0,0 @@ -0000000 - -
domain-a.de
domain-b.com
 alle anzeigen
- -
-
- - - - diff --git a/test/package_ids_in_div_id.html b/test/package_ids_in_div_id.html deleted file mode 100644 index 4ff3869..0000000 --- a/test/package_ids_in_div_id.html +++ /dev/null @@ -1,5 +0,0 @@ - -
-

domain_a.de

-

domain_b.de

-
\ No newline at end of file diff --git a/test/projectPage.html b/test/projectPage.html deleted file mode 100644 index ab79e76..0000000 --- a/test/projectPage.html +++ /dev/null @@ -1,656 +0,0 @@ - -
-
-
- -
-
-
\ No newline at end of file