Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : bkabrda-workspace
---------------------------------------------------------------
commit 7b39efdb2a66b1609506e919b0436286a9f8d72c
Author: Bohuslav Kabrda <bkabrda(a)redhat.com>
Date: Mon Nov 26 13:06:21 2012 +0100
More fixes
---------------------------------------------------------------
wsgi/coprs/views/coprs_ns/coprs_general.py | 4 ++--
wsgi/tests/coprs_test_case.py | 2 +-
.../tests/test_views/test_coprs_ns/test_general.py | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/wsgi/coprs/views/coprs_ns/coprs_general.py
b/wsgi/coprs/views/coprs_ns/coprs_general.py
index 0a3cccf..d370bbf 100644
--- a/wsgi/coprs/views/coprs_ns/coprs_general.py
+++ b/wsgi/coprs/views/coprs_ns/coprs_general.py
@@ -189,8 +189,8 @@ def copr_update_permissions(username, coprname):
if permissions_form.validate_on_submit():
# we don't change owner (yet)
for perm in permissions:
- copr_builder = helpers.PermissionEnum.num('Asked')
- copr_admin = helpers.PermissionEnum.num('Asked')
+ copr_builder = helpers.PermissionEnum.num('Request')
+ copr_admin = helpers.PermissionEnum.num('Request')
if permissions_form['copr_builder_{0}'.format(perm.user_id)].data:
copr_builder = helpers.PermissionEnum.num('Approved')
if permissions_form['copr_admin_{0}'.format(perm.user_id)].data:
diff --git a/wsgi/tests/coprs_test_case.py b/wsgi/tests/coprs_test_case.py
index 1ddd094..3aa7496 100644
--- a/wsgi/tests/coprs_test_case.py
+++ b/wsgi/tests/coprs_test_case.py
@@ -59,7 +59,7 @@ class CoprsTestCase(object):
def f_copr_permissions(self):
self.cp1 = models.CoprPermission(copr = self.c2, user = self.u1, copr_builder =
helpers.PermissionEnum.num('Approved'), copr_admin =
helpers.PermissionEnum.num('No Action'))
self.cp2 = models.CoprPermission(copr = self.c3, user = self.u3, copr_builder =
helpers.PermissionEnum.num('No Action'), copr_admin =
helpers.PermissionEnum.num('No Action'))
- self.cp3 = models.CoprPermission(copr = self.c3, user = self.u1, copr_builder =
helpers.PermissionEnum.num('Requested'), copr_admin =
helpers.PermissionEnum.num('Approved'))
+ self.cp3 = models.CoprPermission(copr = self.c3, user = self.u1, copr_builder =
helpers.PermissionEnum.num('Request'), copr_admin =
helpers.PermissionEnum.num('Approved'))
self.db.session.add_all([self.cp1, self.cp2, self.cp3])
self.db.session.commit()
diff --git a/wsgi/tests/test_views/test_coprs_ns/test_general.py
b/wsgi/tests/test_views/test_coprs_ns/test_general.py
index 5cd3457..d5088cf 100644
--- a/wsgi/tests/test_views/test_coprs_ns/test_general.py
+++ b/wsgi/tests/test_views/test_coprs_ns/test_general.py
@@ -157,7 +157,6 @@ class TestCoprEdit(CoprsTestCase):
self.db.session.add_all([self.u2, self.c3])
r = c.get('/coprs/detail/{0}/{1}/edit/'.format(self.u2.name,
self.c3.name))
- print r.data
assert r.data.count('No Action') == 2
assert '<input id="copr_builder_1"
name="copr_builder_1" type="checkbox" value="y">' in
r.data
assert '<input checked id="copr_admin_1"
name="copr_admin_1" type="checkbox" value="y">' in
r.data