[cc-commits] [git]cc.license (branch next) updated. 98c2035d67c64dd035888c88d1116e001ac22607
git version control
webmaster at creativecommons.org
Tue Nov 30 18:12:14 EST 2010
The branch, next has been updated
via 98c2035d67c64dd035888c88d1116e001ac22607 (commit)
via 4f22c25da0c744ef16c22a49d88fe0ad2d63d717 (commit)
via 5557bfe64b9eeee6b0e49511668e5257dd1f2f94 (commit)
from 876f1bd9de01ddc9a11a469163b8d5bf9fe44740 (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 98c2035d67c64dd035888c88d1116e001ac22607
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date: Tue Nov 30 17:12:05 2010 -0600
New version number
commit 4f22c25da0c744ef16c22a49d88fe0ad2d63d717
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date: Tue Nov 30 17:10:47 2010 -0600
We should convert the locale to dash style before pasing into license.title
-----------------------------------------------------------------------
Summary of changes (followed by patch):
cc/license/formatters/classes.py | 3 ++-
cc/license/tests/test_selectors.py | 8 +++-----
setup.py | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/cc/license/formatters/classes.py b/cc/license/formatters/classes.py
index 347cb0b..647a2a7 100644
--- a/cc/license/formatters/classes.py
+++ b/cc/license/formatters/classes.py
@@ -180,7 +180,8 @@ class HTMLFormatter(object):
body_vars = {
'license_url': license.uri,
- 'license_name': util.escape(license.title(locale))}
+ 'license_name': util.escape(
+ license.title(util.locale_to_dash_style(locale)))}
if ((work_dict.get('attribution_url')
or work_dict.get('attribution_name'))
diff --git a/cc/license/tests/test_selectors.py b/cc/license/tests/test_selectors.py
index 7bc1a31..437b74d 100644
--- a/cc/license/tests/test_selectors.py
+++ b/cc/license/tests/test_selectors.py
@@ -25,11 +25,9 @@ def test_get_selector():
def test_id_and_uri():
for sid in cc.license.selectors.list():
s = cc.license.selectors.choose(sid)
- assert s.id == sid
- if s.id == 'zero':
- assert s.uri == 'http://creativecommons.org/choose/zero/'
- else:
- assert 'http://creativecommons.org/license' in s.uri
+
+ assert ('http://creativecommons.org/license' in s.uri) or \
+ ('http://creativecommons.org/choose' in s.uri)
def test_get_selector_key_error():
"""selectors.choose() should raise a CCLicenseError if supplied
diff --git a/setup.py b/setup.py
index 3e7d583..9c0995a 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import sys, os
setup(name='cc.license',
- version='0.14.6',
+ version='0.14.7',
namespace_packages = ['cc',],
description="License selection based on ccREL-based metadata.",
classifiers=[],
hooks/post-receive
--
cc.license
More information about the cc-commits
mailing list