Exemplo n.º 1
0
 def test_typeahead_bad_upstream_response(self, mock_get):
     mock_get.return_value.ok = False
     result = typeahead('')
     self.assertEqual(result, [])
Exemplo n.º 2
0
 def test_typeahead_bad_upstream_response(self, mock_get):
     mock_get.return_value.ok = False
     result = typeahead('')
     self.assertEqual(result, [])
Exemplo n.º 3
0
 def test_typeahead(self, mock_get):
     mock_get.return_value.ok = True
     mock_get.return_value.json.return_value = ['auto']
     result = typeahead('au')
     self.assertEqual(result, ['auto'])
Exemplo n.º 4
0
 def test_typeahead(self, mock_get):
     mock_get.return_value.ok = True
     mock_get.return_value.json.return_value = ['auto']
     result = typeahead('au')
     self.assertEqual(result, ['auto'])