Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit e0cf1d54d23a5d42b3701c5143c3eac01487a6e9
Author: Jakub Kadlčík <jkadlcik(a)redhat.com>
Date: Tue Jun 2 14:27:44 2015 +0200
Fix default networking option (RhBug:1215157)
---------------------------------------------------------------
.../coprs/views/coprs_ns/coprs_general.py | 1 +
.../test_views/test_coprs_ns/test_coprs_builds.py | 15 +++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
index 09a415e..70085e1 100644
--- a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
+++ b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
@@ -140,6 +140,7 @@ def copr_new(username):
description=form.description.data,
instructions=form.instructions.data,
disable_createrepo=form.disable_createrepo.data,
+ build_enable_net=form.build_enable_net.data,
)
db.session.commit()
diff --git a/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
b/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
index f14842f..15c0ee1 100644
--- a/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
+++ b/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
@@ -66,6 +66,21 @@ class TestCoprAddBuild(CoprsTestCase):
assert not self.models.Build.query.first()
+ @TransactionDecorator("u1")
+ def test_copr_default_options(self, f_users, f_mock_chroots, f_db):
+ self.test_client.post(
+ "/coprs/{0}/new/".format(self.u1.name),
+ data={"name": "foo",
+ "fedora-rawhide-i386": "y", # Needed?
+ "arches": ["i386"], # Needed?
+ "build_enable_net": None,
+ },
+ follow_redirects=True)
+
+ r = self.tc.get(
+ "/coprs/{0}/{1}/add_build/".format(self.u1.name, "foo"))
+ assert '<input checked id="enable_net"
name="enable_net"' not in r.data
+
class TestCoprCancelBuild(CoprsTestCase):