Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 75fbcb651141e71dbf17e9da2953a9357e908d17
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Sep 30 18:55:26 2013 +0200
fixing test_fail_on_nonexistent_copr test
addressing:
def test_fail_on_nonexistent_copr(self):
r = self.tc.get('/coprs/bogus-nonexistent-repo/repo/')
assert r.status_code == 404
> assert 'bogus/nonexistent-repo does not exist' in r.data
E assert 'bogus/nonexistent-repo does not exist' in '<!doctype html>\n<html>\n<head>\n <title>Not Found</title>\n <link rel=stylesheet type=text/css href="/static/copr.... <div class="page-inner">\n \n \n Copr with name repo does not exist.\n \n\n </div>\n</div>\n</body>\n</html>'
E + where '<!doctype html>\n<html>\n<head>\n <title>Not Found</title>\n <link rel=stylesheet type=text/css href="/static/copr.... <div class="page-inner">\n \n \n Copr with name repo does not exist.\n \n\n </div>\n</div>\n</body>\n</html>' = <Response 830 bytes [404 NOT FOUND]>.data
>---------------------------------------------------------------
.../test_views/test_coprs_ns/test_coprs_general.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py b/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
index a636287..57f5c26 100644
--- a/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
+++ b/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
@@ -395,7 +395,7 @@ class TestCoprRepoGeneration(CoprsTestCase):
def test_fail_on_nonexistent_copr(self):
r = self.tc.get('/coprs/bogus-nonexistent-repo/repo/')
assert r.status_code == 404
- assert 'bogus/nonexistent-repo does not exist' in r.data
+ assert 'Copr with name repo does not exist' in r.data
def test_fail_on_no_finished_builds(self, f_users, f_coprs, f_db):
r = self.tc.get(
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8a53950d445ac04000c948169a2d69f582a45da0
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Sep 27 15:07:35 2013 +0200
Adjust API endpoint to reflects the UI endpoints in their url structure
>---------------------------------------------------------------
coprs_frontend/coprs/views/api_ns/api_general.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/coprs_frontend/coprs/views/api_ns/api_general.py b/coprs_frontend/coprs/views/api_ns/api_general.py
index 7130509..205f561 100644
--- a/coprs_frontend/coprs/views/api_ns/api_general.py
+++ b/coprs_frontend/coprs/views/api_ns/api_general.py
@@ -44,9 +44,9 @@ def api_new_token():
return flask.redirect(flask.url_for('api_ns.api_home'))
-(a)api_ns.route('/copr/new/', methods=['POST'])
+(a)api_ns.route('/coprs/<username>/new/', methods=['POST'])
@api_login_required
-def api_new_copr():
+def api_new_copr(username):
""" Receive information from the user on how to create its new copr,
check their validity and create the corresponding copr.
@@ -101,8 +101,8 @@ def api_new_copr():
return jsonout
-(a)api_ns.route('/owned/')
-(a)api_ns.route('/owned/<username>/')
+(a)api_ns.route('/coprs/')
+(a)api_ns.route('/coprs/<username>/')
def api_coprs_by_owner(username=None):
""" Return the list of coprs owned by the given user.
username is taken either from GET params or from the URL itself
@@ -133,8 +133,7 @@ def api_coprs_by_owner(username=None):
return jsonout
-(a)api_ns.route('/coprs/detail/<username>/<coprname>/new_build/',
- methods=["POST"])
+(a)api_ns.route('/coprs/<username>/<coprname>/new_build/', methods=["POST"])
@api_login_required
def copr_new_build(username, coprname):
form = forms.BuildForm(csrf_enabled=False)