def test_settings_endpoint_returns_correct_protocol_and_host_badges(self): custom_dir_path = str(Path.home()) TestSettings.setUp(self, custom_dir=custom_dir_path) TestSettings._create_tmp_config(self) self.assertEqual( generate_endpoints( endpoint_type="badges", project_id=1234, custom_config_path=self.config_path, )[0], "https://test.gitlab.com/api/v4/projects/1234/badges", )
def test_settings_endpoint_returns_a_list_badges(self): TestSettings._create_tmp_config(self) self.assertIsInstance( generate_endpoints(endpoint_type="badges", project_id=1234), list )
def test_settings_endpoint_returns_correct_host_url_badges(self): TestSettings._create_tmp_config(self) self.assertEqual( generate_endpoints(endpoint_type="badges", project_id=1234)[1], "https://test.gitlab.com", )
def test_settings_endpoint_returns_correct_project_id_labels(self): TestSettings._create_tmp_config(self) self.assertEqual( generate_endpoints(endpoint_type="labels", project_id=1234)[0], "https://test.gitlab.com/api/v4/projects/1234/labels", )