Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit dbc6384556c9b7efd9502445ce4f7344410178b6
Author: Richard Marko <rmarko(a)fedoraproject.org>
Date: Thu Nov 14 16:10:07 2013 +0100
[tests]: replace test_allowed_one
Replaces failing test_allowed_one which doesn't make much sense
with test_allowed_one_but_... which checks the same thing.
Signed-off-by: Richard Marko <rmarko(a)fedoraproject.org>
---------------------------------------------------------------
copr.spec | 5 +----
.../test_views/test_coprs_ns/test_coprs_general.py | 8 +-------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/copr.spec b/copr.spec
index 5203312..3c7afc5 100644
--- a/copr.spec
+++ b/copr.spec
@@ -263,10 +263,7 @@ install -p -m 644 man/%{name}-selinux-relabel.8
%{buildroot}/%{_mandir}/man8/
%check
%if ! 0%{?with_test:1}
pushd coprs_frontend
- TMPFILE=$(mktemp)
- COPR_CONFIG="$(pwd)/config/copr_unit_test.conf" ./manage.py test | tee
$TMPFILE
- # remove this when tests are fixed
- grep "1 failed, 65 passed" $TMPFILE
+ COPR_CONFIG="$(pwd)/config/copr_unit_test.conf" ./manage.py test
popd
%endif
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 179dad7..a05c54d 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
@@ -35,14 +35,8 @@ class TestCoprsAllowed(CoprsTestCase):
r = self.test_client.get('/coprs/{0}/allowed/'.format(self.u3.name))
assert 'No projects...' in r.data
- @TransactionDecorator('u2')
- def test_allowed_one(self, f_users, f_coprs, f_copr_permissions, f_db):
- self.db.session.add(self.u1)
- r = self.test_client.get('/coprs/{0}/allowed/'.format(self.u2.name))
- assert r.data.count('<div class="copr">') == 1
-
@TransactionDecorator('u1')
- def test_allowed_one_but_asked_for_one_more(self, f_users, f_coprs,
f_copr_permissions, f_db):
+ def test_allowed_one(self, f_users, f_coprs, f_copr_permissions, f_db):
self.db.session.add(self.u1)
r = self.test_client.get('/coprs/{0}/allowed/'.format(self.u1.name))
assert r.data.count('<div class="copr">') == 1