[cc-commits] [SCM] cc.engine: License chooser & etc (branch fsfredirects) updated. c0cf7eeaaf025375a63fa58cfad6e2f4e97f4869

git version control git at a7.creativecommons.org
Fri Nov 19 17:34:02 EST 2010


The branch, fsfredirects has been updated
       via  c0cf7eeaaf025375a63fa58cfad6e2f4e97f4869 (commit)
      from  149f5e562951bfa5b310cee1b128ce426f881b2c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c0cf7eeaaf025375a63fa58cfad6e2f4e97f4869
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date:   Fri Nov 19 16:34:00 2010 -0600

    Added tests for redirecting to gnu.org when license_code=[L]GPL

-----------------------------------------------------------------------

Summary of changes (followed by patch):
 cc/engine/tests/test_views.py |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/cc/engine/tests/test_views.py b/cc/engine/tests/test_views.py
index a62c53d..1cbfa3a 100644
--- a/cc/engine/tests/test_views.py
+++ b/cc/engine/tests/test_views.py
@@ -182,6 +182,30 @@ def test_gpl_lgpl_redirects():
     assert gpl_redirect == lgpl_redirect == expected_redirect
 
 
+def test_normalchooser_gpl_redirects():
+    """
+    There was an error on the old GPL/LGPL deeds where they pointed to
+    the chooser when they should have pointed to gnu.org.  As such,
+    when license_code=GPL or LGPL, we should redirect.
+    """
+    gpl_redirect = TESTAPP.get(
+        '/choose/results-one'
+        '?license_code=GPL&jurisdiction=&version=2.0&lang=en').location
+    lgpl_redirect = TESTAPP.get(
+        '/choose/results-one'
+        '?license_code=LGPL&jurisdiction=&version=2.0&lang=en').location
+    expected_redirect = 'http://www.gnu.org/licenses/gpl-howto.html'
+    assert gpl_redirect == lgpl_redirect == expected_redirect
+
+    # But, no other license_code should redirect...
+    assert not TESTAPP.get(
+        '/choose/results-one'
+        '?license_code=by&jurisdiction=&version=2.0&lang=en').location
+    assert not TESTAPP.get(
+        '/choose/results-one'
+        '?license_code=by-sa&jurisdiction=&version=2.0&lang=en').location
+
+
 def test_deeds_up_for_licenses():
     """
     Make sure all licenses that the RDF claims exist show up with 200 OK


hooks/post-receive
-- 
cc.engine: License chooser & etc



More information about the cc-commits mailing list