def test_04_delete_package_from_dict(self):
        package = model.Package.by_name('council-owned-litter-bins')
        assert package
        check_search_results('', 3)

        # delete it
        rev = model.repo.new_revision()
        package.delete()
        model.repo.commit_and_remove()
        
        check_search_results('', 2)
Ejemplo n.º 2
0
    def test_04_delete_package_from_dict(self):
        package = model.Package.by_name('council-owned-litter-bins')
        assert package
        check_search_results('', 3)

        # delete it
        rev = model.repo.new_revision()
        package.delete()
        model.repo.commit_and_remove()
        
        check_search_results('', 2)
    def test_03_update_package_from_dict(self):
        package = model.Package.by_name('council-owned-litter-bins')

        # update package
        rev = model.repo.new_revision()
        package.name = u'new_name'
        extra = model.PackageExtra(key='published_by', value='barrow')
        package._extras[extra.key] = extra
        model.repo.commit_and_remove()
        
        check_search_results('', 3)
        check_search_results('barrow', 1, ['new_name'])

        # update package again
        package = model.Package.by_name('new_name')
        rev = model.repo.new_revision()
        package.name = u'council-owned-litter-bins'
        model.repo.commit_and_remove()

        check_search_results('', 3)
        check_search_results('test-spatial', 1, ['council-owned-litter-bins'])
Ejemplo n.º 4
0
    def test_03_update_package_from_dict(self):
        package = model.Package.by_name('council-owned-litter-bins')

        # update package
        rev = model.repo.new_revision()
        package.name = u'new_name'
        extra = model.PackageExtra(key='published_by', value='barrow')
        package._extras[extra.key] = extra
        model.repo.commit_and_remove()
        
        check_search_results('', 3)
        check_search_results('barrow', 1, ['new_name'])

        # update package again
        package = model.Package.by_name('new_name')
        rev = model.repo.new_revision()
        package.name = u'council-owned-litter-bins'
        model.repo.commit_and_remove()

        check_search_results('', 3)
        check_search_results('spatial', 1, ['council-owned-litter-bins'])
    def test_overall(self):
        check_search_results('annakarenina', 1, ['annakarenina'])
        check_search_results('warandpeace', 1, ['warandpeace'])
        check_search_results('', 2)

        check_search_results('Tolstoy', 1, ['annakarenina'])
        check_search_results('title:Novel', 1, ['annakarenina'])
        check_search_results('title:peace', 0)
        check_search_results('name:warandpeace', 1)
        check_search_results('groups:david', 2)
        check_search_results('groups:roger', 1)
        check_search_results('groups:lenny', 0)
        check_search_results('tags:"russian"', 2)
        check_search_results(u'tags:"Flexible \u30a1"', 2)
        check_search_results(u'Flexible \u30a1', 2)
        check_search_results(u'Flexible', 2)
        check_search_results(u'flexible', 2)
Ejemplo n.º 6
0
    def test_overall(self):
        check_search_results('annakarenina', 1, ['annakarenina'])
        check_search_results('warandpeace', 1, ['warandpeace'])
        check_search_results('', 2)

        check_search_results('Tolstoy', 1, ['annakarenina'])
        check_search_results('title:Novel', 1, ['annakarenina'])
        check_search_results('title:peace', 0)
        check_search_results('name:warandpeace', 1)
        check_search_results('groups:david', 2)
        check_search_results('groups:roger', 1)
        check_search_results('groups:lenny', 0)
        check_search_results('tags:"russian"', 2)
        check_search_results(u'tags:"Flexible \u30a1"', 2)
        check_search_results(u'Flexible \u30a1', 2)
        check_search_results(u'Flexible', 2)
        check_search_results(u'flexible', 2)
Ejemplo n.º 7
0
    def test_overall(self):
        check_search_results("annakarenina", 1, ["annakarenina"])
        check_search_results("warandpeace", 1, ["warandpeace"])
        check_search_results("", 2)

        check_search_results("A Novel By Tolstoy", 1, ["annakarenina"])
        check_search_results("title:Novel", 1, ["annakarenina"])
        check_search_results("title:peace", 0)
        check_search_results("name:warandpeace", 1)
        check_search_results("groups:david", 2)
        check_search_results("groups:roger", 1)
        check_search_results("groups:lenny", 0)
        check_search_results('tags:"russian"', 2)
        check_search_results(u'tags:"Flexible \u30a1"', 2)
        check_search_results(u"Flexible \u30a1", 2)
        check_search_results(u"Flexible", 2)
        check_search_results(u"flexible", 2)
 def test_02_add_package_from_dict(self):
     check_search_results('', 3)
     check_search_results('test-spatial', 1, ['council-owned-litter-bins'])
Ejemplo n.º 9
0
 def test_02_add_package_from_dict(self):
     check_search_results('', 3)
     check_search_results('spatial', 1, ['council-owned-litter-bins'])