[copr] bkabrda-workspace: Add test that makes sure that admin can update copr attributes (4820c7c)
bkabrda at fedoraproject.org
bkabrda at fedoraproject.org
Tue Nov 27 13:03:42 UTC 2012
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : bkabrda-workspace
>---------------------------------------------------------------
commit 4820c7c0007f26c4a7eb5bf561103a2543ce9625
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date: Tue Nov 27 14:03:31 2012 +0100
Add test that makes sure that admin can update copr attributes
>---------------------------------------------------------------
.../tests/test_views/test_coprs_ns/test_general.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/coprs_frontend/tests/test_views/test_coprs_ns/test_general.py b/coprs_frontend/tests/test_views/test_coprs_ns/test_general.py
index a30731e..e2565b1 100644
--- a/coprs_frontend/tests/test_views/test_coprs_ns/test_general.py
+++ b/coprs_frontend/tests/test_views/test_coprs_ns/test_general.py
@@ -174,6 +174,18 @@ class TestCoprUpdate(CoprsTestCase):
follow_redirects = True)
assert 'Copr was updated successfully' in r.data
+ def test_copr_admin_can_update(self, f_users, f_coprs, f_copr_permissions):
+ with self.tc as c:
+ with c.session_transaction() as s:
+ s['openid'] = self.u1.openid_name
+
+ self.db.session.add_all([self.u2, self.c3])
+ r = c.post('/coprs/detail/{0}/{1}/update/'.format(self.u2.name, self.c3.name),
+ data = {'name': self.c3.name, 'release': self.c3.release, 'arches': self.c3.arches, 'id': self.c3.id},
+ follow_redirects = True)
+ assert 'Copr was updated successfully' in r.data
+
+
class TestCoprApplyForPermissions(CoprsTestCase):
def test_apply(self, f_users, f_coprs):
with self.tc as c:
More information about the copr-devel
mailing list