Exemplo n.º 1
0
 def test_get_all_preprocessings_for_latest_one_lan(self):
     parameters = [('source', 'en'), ('target', '#EMPTY#'),
                   ('corpus', 'RF'), ('preprocessing', '#EMPTY#'),
                   ('version', '#EMPTY#'), ('latest', 'True')]
     command, params = make_sql_command(parameters.copy(), False)
     ret = submitCommand(command, params, False)
     ret = addRelatedMonoData(ret, parameters)
     self.assertEqual(len(ret), 103)
     for i in ret:
         self.assertEqual(i['corpus'], 'RF')
Exemplo n.º 2
0
 def test_get_specific_version_one_lan(self):
     parameters = [('source', 'en'), ('target', '#EMPTY#'),
                   ('corpus', 'SETIMES'), ('preprocessing', 'xml'),
                   ('version', 'v1'), ('latest', '#EMPTY#')]
     command, params = make_sql_command(parameters.copy(), False)
     ret = submitCommand(command, params, False)
     ret = addRelatedMonoData(ret, parameters)
     self.assertEqual(len(ret), 17)
     for i in ret:
         self.assertEqual(i['corpus'], 'SETIMES')