def test_delete_published_clusters_configuration(self):
        path = "projects/1/publishedClustersConfiguration"
        config_url = f"{self._base_url}/{path}"
        responses.add(responses.GET, config_url, json=self._config_json)
        responses.add(responses.DELETE, config_url, status=405)

        p = Project(self.tamr, self._project_config_json).as_mastering()
        config = p.published_clusters_configuration()
        self.assertRaises(HTTPError, config.delete)
    def test_published_clusters_configuration(self):
        path = "projects/1/publishedClustersConfiguration"
        config_url = f"{self._base_url}/{path}"
        responses.add(responses.GET, config_url, json=self._config_json)

        p = Project(self.tamr, self._project_config_json).as_mastering()
        config = p.published_clusters_configuration()
        created = PublishedClustersConfiguration.from_json(
            self.tamr, self._config_json, path)

        self.assertEqual(repr(config), repr(created))
        self.assertEqual(config.versions_time_to_live,
                         self._config_json["versionsTimeToLive"])