Ejemplo n.º 1
0
 def test_locations(self):
     self.assertEqual(location('8.8.8.8'), 'United States')
     self.assertEqual(location('44.55.66.77'), 'San Diego, United States')
Ejemplo n.º 2
0
 def location(self, obj):
     return location(obj.ip)
Ejemplo n.º 3
0
 def location(self, obj):
     return location(obj.ip)
Ejemplo n.º 4
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), '<i>unknown</i>')
Ejemplo n.º 5
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), '<i>unknown</i>')
Ejemplo n.º 6
0
 def test_locations(self):
     self.assertEqual(location('8.8.8.8'), 'United States')
     self.assertEqual(location('44.55.66.77'), 'San Diego, United States')
Ejemplo n.º 7
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), None)
Ejemplo n.º 8
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), None)
Ejemplo n.º 9
0
 def test_locations(self):
     self.assertEqual('United States', location('8.8.8.8'))
     self.assertIn('United States', location('44.55.66.77'))
Ejemplo n.º 10
0
 def test_locations(self):
     self.assertEqual(location("8.8.8.8"), "Mountain View, United States")
     self.assertEqual(location("44.55.66.77"), "San Diego, United States")
Ejemplo n.º 11
0
 def test_no_location(self):
     self.assertEqual(location("127.0.0.1"), "<i>unknown</i>")