[copr] master: Fix builds tests (c009459)
bkabrda at fedoraproject.org
bkabrda at fedoraproject.org
Mon Jan 21 11:13:28 UTC 2013
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit c009459143f234c87baf1ed8cef155a3154ceb28
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date: Mon Jan 21 10:56:23 2013 +0100
Fix builds tests
>---------------------------------------------------------------
.../tests/test_views/test_coprs_ns/test_builds.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/coprs_frontend/tests/test_views/test_coprs_ns/test_builds.py b/coprs_frontend/tests/test_views/test_coprs_ns/test_builds.py
index 375c998..71c869b 100644
--- a/coprs_frontend/tests/test_views/test_coprs_ns/test_builds.py
+++ b/coprs_frontend/tests/test_views/test_coprs_ns/test_builds.py
@@ -5,8 +5,7 @@ from tests.coprs_test_case import CoprsTestCase
class TestCoprShowBuilds(CoprsTestCase):
def test_copr_show_builds(self, f_users, f_coprs, f_builds):
r = self.tc.get('/coprs/detail/{0}/{1}/builds/'.format(self.u2.name, self.c2.name))
- print r.data
- assert r.data.count('<tr class=build-') == 2
+ assert r.data.count('<tr class="build-') == 2
class TestCoprAddBuild(CoprsTestCase):
def test_copr_owner_can_add_build(self, f_users, f_coprs):
@@ -15,7 +14,7 @@ class TestCoprAddBuild(CoprsTestCase):
s['openid'] = self.u1.openid_name
self.db.session.add_all([self.u1, self.c1])
- r = c.post('/coprs/detail/{0}/{1}/add_build/'.format(self.u1.name, self.c1.name),
+ r = c.post('/coprs/detail/{0}/{1}/new_build/'.format(self.u1.name, self.c1.name),
data = {'pkgs': 'http://testing'},
follow_redirects = True)
assert self.models.Build.query.first().pkgs == 'http://testing'
@@ -26,7 +25,7 @@ class TestCoprAddBuild(CoprsTestCase):
s['openid'] = self.u1.openid_name
self.db.session.add_all([self.u2, self.c2])
- r = c.post('/coprs/detail/{0}/{1}/add_build/'.format(self.u2.name, self.c2.name),
+ r = c.post('/coprs/detail/{0}/{1}/new_build/'.format(self.u2.name, self.c2.name),
data = {'pkgs': 'http://testing'},
follow_redirects = True)
assert self.models.Build.query.first().pkgs == 'http://testing'
@@ -37,7 +36,7 @@ class TestCoprAddBuild(CoprsTestCase):
s['openid'] = self.u1.openid_name
self.db.session.add_all([self.u2, self.c3])
- r = c.post('/coprs/detail/{0}/{1}/add_build/'.format(self.u2.name, self.c3.name),
+ r = c.post('/coprs/detail/{0}/{1}/new_build/'.format(self.u2.name, self.c3.name),
data = {'pkgs': 'http://testing'},
follow_redirects = True)
assert not self.models.Build.query.first()
@@ -48,7 +47,7 @@ class TestCoprAddBuild(CoprsTestCase):
s['openid'] = self.u3.openid_name
self.db.session.add_all([self.u1, self.c1])
- r = c.post('/coprs/detail/{0}/{1}/add_build/'.format(self.u1.name, self.c1.name),
+ r = c.post('/coprs/detail/{0}/{1}/new_build/'.format(self.u1.name, self.c1.name),
data = {'pkgs': 'http://testing'},
follow_redirects = True)
assert not self.models.Build.query.first()
More information about the copr-devel
mailing list