Ejemplo n.º 1
0
 def test_only_id(self):
     #  guessing in presence of name and id fields
     url2complete = "/advancedcomputersearches/name/{name}/id/{id}"
     guessed_url = guessing_url_name(url2complete, self.extr_data)
     should_be = "/advancedcomputersearches/name/_unmanaged/id/202"
     self.assertEqual(guessed_url, should_be)
Ejemplo n.º 2
0
 def test_no_k_f(self):
     #  guessing with no known fields
     url2complete = "/advancedcomputersearches/name//id/"
     guessed_url = guessing_url_name(url2complete, self.extr_data)
     self.assertEqual(guessed_url, url2complete)
Ejemplo n.º 3
0
 def test_name_id2(self):
     #  guessing in presence of name fields, other
     url2complete = "/advancedcomputersearches/{name}/id/"
     guessed_url = guessing_url_name(url2complete, self.extr_data)
     should_be = "/advancedcomputersearches/_unmanaged/id/"
     self.assertEqual(guessed_url, should_be)