Exemplo n.º 1
0
 def test_ogl_url_with_trailing_semicolon(self):
     assert_equal(
         detect_license_id(
             'Some licence (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/; More terms'
         ), ('uk-ogl', False))
Exemplo n.º 2
0
 def test_ogl_mispelt(self):
     assert_equal(detect_license_id('Open Government License'),
                  ('uk-ogl', True))
Exemplo n.º 3
0
 def test_ogl_abbreviation_in_parens(self):
     assert_equal(detect_license_id('Some licence (OGL)'),
                  ('uk-ogl', False))
Exemplo n.º 4
0
 def test_ogl_variations_are_wholy_ogl_17(self):
     assert_equal(
         detect_license_id(
             'Public data (Crown Copyright) - Open Government Licence Terms and Conditions apply'
         ), ('uk-ogl', True))
Exemplo n.º 5
0
 def test_not_ogl(self):
     assert_equal(
         detect_license_id(
             'Data is freely available for research or commercial use providing that the originators are acknowledged in any publications produced.'
         ), ('', None))
Exemplo n.º 6
0
 def test_ogl_variations_are_wholy_ogl_6(self):
     assert_equal(
         detect_license_id(
             'Use of data subject to the Terms and Conditions of the OGL (Open Government Licence): data is free to use for provided the source is acknowledged as specified in said document.'
         ), ('uk-ogl', True))
Exemplo n.º 7
0
 def test_ogl_variations_are_wholy_ogl_12(self):
     assert_equal(detect_license_id('Open Government Licence; None'),
                  ('uk-ogl', True))
Exemplo n.º 8
0
 def test_ogl_url_with_trailing_semicolon(self):
     assert_equal(detect_license_id('Some licence (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/; More terms'),
                  ('uk-ogl', False))
Exemplo n.º 9
0
 def test_ogl_and_require_citation(self):
     assert_equal(detect_license_id('Use of data subject to the Terms and Conditions of the OGL (Open Government Licence) and you must cite "Natural England" as the source.'),
                  ('uk-ogl', False))
Exemplo n.º 10
0
 def test_ogl_abbreviation_in_parens(self):
     assert_equal(detect_license_id('Some licence (OGL)'),
                  ('uk-ogl', False))
Exemplo n.º 11
0
 def test_ogl_url_in_parens(self):
     assert_equal(detect_license_id('Some licence (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)'),
                  ('uk-ogl', False))
Exemplo n.º 12
0
 def test_ogl_abbreviation(self):
     assert_equal(detect_license_id('OGL Licence'),
                  ('uk-ogl', True))
Exemplo n.º 13
0
 def test_ogl_mispelt(self):
     assert_equal(detect_license_id('Open Government License'),
                  ('uk-ogl', True))
Exemplo n.º 14
0
 def test_not_ogl2(self):
     assert_equal(detect_license_id('bogl'),
                  ('', None))
Exemplo n.º 15
0
 def test_ogl_and_require_citation2(self):
     assert_equal(
         detect_license_id(
             'Released under the Open Government Licence (OGL), citation of "Natural England" as the source required.'
         ), ('uk-ogl', False))
Exemplo n.º 16
0
 def test_ogl_and_require_citation2(self):
     assert_equal(detect_license_id('Released under the Open Government Licence (OGL), citation of "Natural England" as the source required.'),
                  ('uk-ogl', False))
Exemplo n.º 17
0
 def test_ogl_url(self):
     assert_equal(
         detect_license_id(
             'http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'
         ), ('uk-ogl', True))
Exemplo n.º 18
0
 def test_ogl_with_other_url(self):
     assert_equal(detect_license_id('By using this data you are accepting the terms of the Natural England-OS Open Government Licence (https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/391764/OGL-NE-OS.pdf). For further info contact Natural England (UK +44) 0 845 600 3900 [email protected] <https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/391764/OGL-NE-OS.pdf>'),
                  ('uk-ogl', False))
Exemplo n.º 19
0
 def test_ogl_variations_are_wholy_ogl_8(self):
     assert_equal(
         detect_license_id(
             'Link to the Open Government Licence; Licence; http://www.nationalarchives.gov.uk/doc/open-government-licence/'
         ), ('uk-ogl', True))
Exemplo n.º 20
0
 def test_ogl_url(self):
     assert_equal(detect_license_id('http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
                  ('uk-ogl', True))
Exemplo n.º 21
0
 def test_ogl_variations_are_wholy_ogl_15(self):
     assert_equal(
         detect_license_id(
             'In accessing or using this data, you are deemed to have accepted the terms of the UK Open Government Licence v3.0. - http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'
         ), ('uk-ogl', True))
Exemplo n.º 22
0
 def test_ogl_variations_are_wholy_ogl_2(self):
     assert_equal(detect_license_id('Open government license for public sector information.; http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
                  ('uk-ogl', True))
Exemplo n.º 23
0
 def test_not_ogl(self):
     assert_equal(detect_license_id('Data is freely available for research or commercial use providing that the originators are acknowledged in any publications produced.'),
                  ('', None))
Exemplo n.º 24
0
 def test_ogl_variations_are_wholy_ogl_6(self):
     assert_equal(detect_license_id('Use of data subject to the Terms and Conditions of the OGL (Open Government Licence): data is free to use for provided the source is acknowledged as specified in said document.'),
                  ('uk-ogl', True))
Exemplo n.º 25
0
 def test_not_ogl2(self):
     assert_equal(detect_license_id('bogl'), ('', None))
Exemplo n.º 26
0
 def test_ogl_variations_are_wholy_ogl_7(self):
     assert_equal(detect_license_id('Released under the Open Government Licence (OGL), citation of publisher and online resource required on reuse.'),
                  ('uk-ogl', True))
Exemplo n.º 27
0
 def test_ogl_abbreviation(self):
     assert_equal(detect_license_id('OGL Licence'), ('uk-ogl', True))
Exemplo n.º 28
0
 def test_ogl_variations_are_wholy_ogl_8(self):
     assert_equal(detect_license_id('Link to the Open Government Licence; Licence; http://www.nationalarchives.gov.uk/doc/open-government-licence/'),
                  ('uk-ogl', True))
Exemplo n.º 29
0
 def test_ogl_url_in_parens(self):
     assert_equal(
         detect_license_id(
             'Some licence (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)'
         ), ('uk-ogl', False))
Exemplo n.º 30
0
 def test_ogl_variations_are_wholy_ogl_10(self):
     assert_equal(detect_license_id('Link to the Open Government Licence; Link to the Ordnance Survey Open Data Licence; Licence; http://www.ordnancesurvey.co.uk/oswebsite/docs/licences/os-opendata-licence.pdf; http://www.nationalarchives.gov.uk/doc/open-government-licence/'),
                  ('uk-ogl', True))
Exemplo n.º 31
0
 def test_ogl_and_require_citation(self):
     assert_equal(
         detect_license_id(
             'Use of data subject to the Terms and Conditions of the OGL (Open Government Licence) and you must cite "Natural England" as the source.'
         ), ('uk-ogl', False))
Exemplo n.º 32
0
 def test_ogl_variations_are_wholy_ogl_12(self):
     assert_equal(detect_license_id('Open Government Licence; None'),
                  ('uk-ogl', True))
Exemplo n.º 33
0
 def test_ogl_with_other_url(self):
     assert_equal(
         detect_license_id(
             'By using this data you are accepting the terms of the Natural England-OS Open Government Licence (https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/391764/OGL-NE-OS.pdf). For further info contact Natural England (UK +44) 0 845 600 3900 [email protected] <https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/391764/OGL-NE-OS.pdf>'
         ), ('uk-ogl', False))
Exemplo n.º 34
0
 def test_ogl_variations_are_wholy_ogl_14(self):
     assert_equal(detect_license_id('Open Government Licences and agreements explained; http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/;'),
                  ('uk-ogl', True))
Exemplo n.º 35
0
 def test_ogl_variations_are_wholy_ogl_2(self):
     assert_equal(
         detect_license_id(
             'Open government license for public sector information.; http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'
         ), ('uk-ogl', True))
Exemplo n.º 36
0
 def test_ogl_variations_are_wholy_ogl_15(self):
     assert_equal(detect_license_id('In accessing or using this data, you are deemed to have accepted the terms of the UK Open Government Licence v3.0. - http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
                  ('uk-ogl', True))
Exemplo n.º 37
0
 def test_ogl_variations_are_wholy_ogl_7(self):
     assert_equal(
         detect_license_id(
             'Released under the Open Government Licence (OGL), citation of publisher and online resource required on reuse.'
         ), ('uk-ogl', True))
Exemplo n.º 38
0
 def test_ogl_variations_are_wholy_ogl_16(self):
     assert_equal(detect_license_id('Open Government Licence: attribution required; http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'),
                  ('uk-ogl', True))
Exemplo n.º 39
0
 def test_ogl_variations_are_wholy_ogl_10(self):
     assert_equal(
         detect_license_id(
             'Link to the Open Government Licence; Link to the Ordnance Survey Open Data Licence; Licence; http://www.ordnancesurvey.co.uk/oswebsite/docs/licences/os-opendata-licence.pdf; http://www.nationalarchives.gov.uk/doc/open-government-licence/'
         ), ('uk-ogl', True))
Exemplo n.º 40
0
 def test_ogl_variations_are_wholy_ogl_17(self):
     assert_equal(detect_license_id('Public data (Crown Copyright) - Open Government Licence Terms and Conditions apply'),
                  ('uk-ogl', True))
Exemplo n.º 41
0
 def test_ogl_variations_are_wholy_ogl_14(self):
     assert_equal(
         detect_license_id(
             'Open Government Licences and agreements explained; http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/;'
         ), ('uk-ogl', True))
Exemplo n.º 42
0
 def test_ne(self):
     # should not really say it is OGL, but the slash and dash are seen as word boundaries
     assert_equal(detect_license_id('https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/391764/OGL-NE-OS.pdf'),
                  ('uk-ogl', False))
Exemplo n.º 43
0
 def test_ogl_variations_are_wholy_ogl_16(self):
     assert_equal(
         detect_license_id(
             'Open Government Licence: attribution required; http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'
         ), ('uk-ogl', True))
Exemplo n.º 44
0
 def test_blank(self):
     assert_equal(detect_license_id(''), ('', None))
Exemplo n.º 45
0
 def test_ne(self):
     # should not really say it is OGL, but the slash and dash are seen as word boundaries
     assert_equal(
         detect_license_id(
             'https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/391764/OGL-NE-OS.pdf'
         ), ('uk-ogl', False))
Exemplo n.º 46
0
 def test_blank(self):
     assert_equal(detect_license_id(''), ('', None))