Skip to content

Commit

Permalink
remove parsing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Buxdehuda authored Feb 7, 2024
1 parent 733096d commit bdca68c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 706 deletions.
28 changes: 0 additions & 28 deletions test/get_package_id_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 0 additions & 17 deletions test/multiple_domains_in_package.html

This file was deleted.

5 changes: 0 additions & 5 deletions test/package_ids_in_div_id.html

This file was deleted.

Loading

0 comments on commit bdca68c

Please sign in to comment.