Example #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')
Example #2
0
 def location(self, obj):
     return location(obj.ip)
Example #3
0
 def location(self, obj):
     return location(obj.ip)
Example #4
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), '<i>unknown</i>')
Example #5
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), '<i>unknown</i>')
Example #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')
Example #7
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), None)
Example #8
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), None)
Example #9
0
 def test_locations(self):
     self.assertEqual('United States', location('8.8.8.8'))
     self.assertIn('United States', location('44.55.66.77'))
Example #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")
Example #11
0
 def test_no_location(self):
     self.assertEqual(location("127.0.0.1"), "<i>unknown</i>")