Changeset 861:f556a52ce160

Show
Ignore:
Timestamp:
03/10/10 16:45:08 (6 months ago)
Author:
johnbywater
Branch:
default
Message:

Fixed license test fixtures.

Location:
ckan
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • ckan/getdata/cospread.py

    r857 r861  
    140140                           _dict['%s - standard' % field] == 'Other (specify)' else \ 
    141141                           _dict['%s - standard' % field] 
    142         #if 'HESA' in _dict['licence']: 
    143         #    license_title = u'OKD Compliant::Higher Education Statistics Agency Copyright with data.gov.uk rights' 
    144         #else: 
    145         #    license_title = u'OKD Compliant::UK Crown Copyright with data.gov.uk rights' 
     142        if 'HESA' in _dict['licence']: 
     143            license_id = u'hesa-withrights' 
     144        else: 
     145            license_id = u'ukcrown-withrights' 
    146146 
    147147        # extras 
     
    240240            pkg.add_resource(resource['url'], format=format, description=resource['description']) 
    241241        pkg.notes=notes 
    242         pkg.license_id = u'dsl' # Todo: Fix this. model.License.by_name(license_str) 
     242        pkg.license_id = license_id 
    243243        assert pkg.license 
    244244        if not existing_pkg: 
  • ckan/getdata/data4nr.py

    r857 r861  
    123123        pkg.add_resource(res_url, description=res_description) 
    124124        pkg.notes=notes 
    125         pkg.license_id = u'dsl' # Todo: Fix this. 
     125        pkg.license_id = u'ukcrown-withrights' 
    126126        if not existing_pkg: 
    127127            user = model.User.by_name(self._username) 
  • ckan/getdata/ons_import.py

    r857 r861  
    190190        self._item_count = 0 
    191191        self._new_package_count = 0 
    192         self._crown_license_id = u'dsl' # Todo: Fix this. 
     192        self._crown_license_id = u'ukcrown-withrights' 
    193193 
    194194 
  • ckan/lib/create_test_data.py

    r857 r861  
    202202        pkg2.tags = [ tag1 ] 
    203203        self.tag_names = [u'russian', u'tolstoy'] 
    204         pkg1.license_id = u'agpl-v3' 
     204        pkg1.license_id = u'other-open' 
    205205        pkg2.title = u'A Wonderful Story' 
    206206        genre_extra = model.PackageExtra(key=u'genre', value='romantic novel') 
     
    294294              'tags':'images  graphics  photographs  photos  pictures  us  usa  america  history  wildlife  nature  war  military  todo-split  gov', 
    295295              'groups':'ukgov test1 penguin', 
    296               'license':'agpl-v3', 
     296              'license':'other-open', 
    297297              'notes':'''## About 
    298298 
     
    376376     'author':'DCSF Data Services Group', 
    377377     'author_email':'statistics@dcsf.gsi.gov.uk', 
    378      'license':'dsl', 
     378     'license':'ukcrown', 
    379379     'tags':'children fostering', 
    380380     'extras':{ 
     
    403403     'author':'DECC Energy Statistics Team', 
    404404     'author_email':'energy.stats@decc.gsi.gov.uk', 
    405      'license':'dsl', 
     405     'license':'ukcrown', 
    406406     'tags':'fuel prices', 
    407407     'extras':{ 
  • ckan/tests/forms/test_package_gov.py

    r856 r861  
    5858            (fs.maintainer, '', ''), 
    5959            (fs.maintainer_email, '', ''), 
    60             (fs.license_id, u'dsl'), # Todo: Fix this. 
     60            (fs.license_id, u'ukcrown'), 
    6161            ] 
    6262        for vals in expected_values: 
  • ckan/tests/functional/test_rest.py

    r856 r861  
    121121#        assert '"license_id": 9' in res, res 
    122122        assert 'license_id' not in res, res 
    123         expected_license = '"license": "%s"' % 'agpl-v3' 
    124         assert expected_license in res, repr(res) + repr(expected_license) 
     123        assert '"license": "other-open"' in res, str(res) 
    125124        assert 'russian' in res, res 
    126125        assert 'tolstoy' in res, res 
     
    768767        assert anna_rec['name'] == 'annakarenina', res_dict['results'] 
    769768        assert anna_rec['title'] == 'A Novel By Tolstoy', anna_rec['title'] 
    770         assert anna_rec['license'] == u'agpl-v3', anna_rec['license'] 
     769        assert anna_rec['license'] == u'other-open', anna_rec['license'] 
    771770        assert len(anna_rec['tags']) == 2, anna_rec['tags'] 
    772771        for expected_tag in ['russian', 'tolstoy']: 

0.9.0.3 © 2008-2010 agile42 all rights reserved (this page was served in: 0.662480 sec.)