示例#1
0
 def test_import_csv(self):
     sys.argv = [
         'import_file', '--from', test_data_csv, '--to',
         settings['sqlalchemy.url']
     ]
     import_file.main(sys.argv)
     self._check_menu()
示例#2
0
 def test_import_rdf(self):
     sys.argv = [
         'import_file', '--from', test_data_rdf, '--to',
         settings['sqlalchemy.url']
     ]
     import_file.main(sys.argv)
     self._check_trees('Trees')
示例#3
0
 def test_import_csv_uri_generator(self):
     sys.argv = [
         'import_file', '--from', test_data_csv, '--to',
         settings['sqlalchemy.url'], '--conceptscheme_label',
         'Menu Conceptscheme', '--conceptscheme_uri', 'http://id.menu.org',
         '--uri_pattern', 'http://id.menu.org/%s'
     ]
     import_file.main(sys.argv)
     self._check_menu('http://id.menu.org/%s')
示例#4
0
 def test_import_json(self):
     sys.argv = [
         'import_file', '--from', test_data_json, '--to',
         settings['sqlalchemy.url'], '--conceptscheme_label',
         'Trees Conceptscheme', '--conceptscheme_uri',
         'http://id.trees.org', '--uri_pattern', 'http://id.trees.org/%s'
     ]
     import_file.main(sys.argv)
     self._check_trees('Trees Conceptscheme')
 def test_import_json(self):
     sys.argv = ['import_file', '--from', test_data_json,
                 '--to', settings['sqlalchemy.url'],
                 '--conceptscheme_label', 'Trees Conceptscheme']
     import_file.main(sys.argv)
     self._check_trees('Trees Conceptscheme')
 def test_import_rdf(self):
     sys.argv = ['import_file', '--from', test_data_rdf, '--to', settings['sqlalchemy.url']]
     import_file.main(sys.argv)
     self._check_trees('Trees')
 def test_import_csv(self):
     sys.argv = ['import_file', '--from', test_data_csv, '--to', settings['sqlalchemy.url']]
     import_file.main(sys.argv)
     self._check_menu()