diff --git a/osclib/check_command.py b/osclib/check_command.py index 93cee40b..31ab1238 100644 --- a/osclib/check_command.py +++ b/osclib/check_command.py @@ -107,11 +107,10 @@ class CheckCommand(object): report = [] if project: - url = self.api.makeurl(('distributions', 'openSUSE:%s' % self.api.opensuse, - 'staging_projects', project + '.json')) + url = self.api.makeurl(('project', 'staging_projects', 'openSUSE:%s' % self.api.opensuse, + project + '.json')) else: - url = self.api.makeurl(('distributions', 'openSUSE:%s' % self.api.opensuse, - 'staging_projects.json')) + url = self.api.makeurl(('project', 'staging_projects', 'openSUSE:%s.json' % self.api.opensuse)) info = json.load(self.api.retried_GET(url)) if not project: for prj in info: diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py index 8f34def8..9cb26f39 100644 --- a/osclib/stagingapi.py +++ b/osclib/stagingapi.py @@ -527,8 +527,7 @@ class StagingAPI(object): _prefix = 'openSUSE:{}:Staging:'.format(self.opensuse) if project.startswith(_prefix): project = project.replace(_prefix, '') - url = self.makeurl(('distributions', 'openSUSE:%s' % self.opensuse, - 'staging_projects', project + '.json')) + url = self.makeurl(('project', 'staging_projects', 'openSUSE:%s' % self.opensuse, project + '.json')) result = json.load(self.retried_GET(url)) return result['overall_state'] == 'acceptable' diff --git a/tests/fixtures/distributions/openSUSE:Factory/staging_projects.json b/tests/fixtures/project/staging_projects/openSUSE:Factory.json similarity index 100% rename from tests/fixtures/distributions/openSUSE:Factory/staging_projects.json rename to tests/fixtures/project/staging_projects/openSUSE:Factory.json diff --git a/tests/fixtures/distributions/openSUSE:Factory/staging_projects/C.json b/tests/fixtures/project/staging_projects/openSUSE:Factory/C.json similarity index 100% rename from tests/fixtures/distributions/openSUSE:Factory/staging_projects/C.json rename to tests/fixtures/project/staging_projects/openSUSE:Factory/C.json diff --git a/tests/fixtures/distributions/openSUSE:Factory/staging_projects/H.json b/tests/fixtures/project/staging_projects/openSUSE:Factory/H.json similarity index 100% rename from tests/fixtures/distributions/openSUSE:Factory/staging_projects/H.json rename to tests/fixtures/project/staging_projects/openSUSE:Factory/H.json