From e2ff3e8afaf496bee0bfb4fbd6374d78819e2f12 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 25 Aug 2014 12:44:05 +0200 Subject: [PATCH] changed the paths again after discussion --- osclib/check_command.py | 7 +++---- osclib/stagingapi.py | 3 +-- .../staging_projects/openSUSE:Factory.json} | 0 .../staging_projects/openSUSE:Factory}/C.json | 0 .../staging_projects/openSUSE:Factory}/H.json | 0 5 files changed, 4 insertions(+), 6 deletions(-) rename tests/fixtures/{distributions/openSUSE:Factory/staging_projects.json => project/staging_projects/openSUSE:Factory.json} (100%) rename tests/fixtures/{distributions/openSUSE:Factory/staging_projects => project/staging_projects/openSUSE:Factory}/C.json (100%) rename tests/fixtures/{distributions/openSUSE:Factory/staging_projects => project/staging_projects/openSUSE:Factory}/H.json (100%) 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