def make_package(name=None):
 if (name is None):
  name = 'test_package'
 pkg = {'name': name, 'title': 'My Test Package', 'author': 'test author', 'author_email': 'test_author@test_author.com', 'maintainer': 'test maintainer', 'maintainer_email': 'test_maintainer@test_maintainer.com', 'notes': 'some test notes', 'url': 'www.example.com'}
 res1 = {'url': 'http://www.example-resource.info', 'description': 'an example resource description', 'format': 'HTML', 'name': 'an example resource'}
 res2 = {'url': 'http://www.example-resource2.info', 'description': 'another example resource description', 'format': 'PDF', 'name': 'another example resource'}
 pkg['resources'] = [res1, res2]
 tag1 = {'name': 'a_test_tag'}
 tag2 = {'name': 'another_test_tag'}
 pkg['tags'] = [tag1, tag2]
 pkg['groups'] = [{'name': 'roger'}]
 return pkg

def make_package ( name = None ) : if ( name is None ) : name = 'test_package' pkg = { 'name' : name , 'title' : 'My Test Package' , 'author' : 'test author' , 'author_email' : 'test_author@test_author.com' , 'maintainer' : 'test maintainer' , 'maintainer_email' : 'test_maintainer@test_maintainer.com' , 'notes' : 'some test notes' , 'url' : 'www.example.com' } res1 = { 'url' : 'http://www.example-resource.info' , 'description' : 'an example resource description' , 'format' : 'HTML' , 'name' : 'an example resource' } res2 = { 'url' : 'http://www.example-resource2.info' , 'description' : 'another example resource description' , 'format' : 'PDF' , 'name' : 'another example resource' } pkg [ 'resources' ] = [ res1 , res2 ] tag1 = { 'name' : 'a_test_tag' } tag2 = { 'name' : 'another_test_tag' } pkg [ 'tags' ] = [ tag1 , tag2 ] pkg [ 'groups' ] = [ { 'name' : 'roger' } ] return pkg
return a test package in dictionary form .