コード例 #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')
コード例 #2
0
ファイル: admin.py プロジェクト: jmp0xf/django-user-sessions
 def location(self, obj):
     return location(obj.ip)
コード例 #3
0
 def location(self, obj):
     return location(obj.ip)
コード例 #4
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), '<i>unknown</i>')
コード例 #5
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), '<i>unknown</i>')
コード例 #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')
コード例 #7
0
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), None)
コード例 #8
0
ファイル: tests.py プロジェクト: Bouke/django-user-sessions
 def test_no_location(self):
     self.assertEqual(location('127.0.0.1'), None)
コード例 #9
0
ファイル: tests.py プロジェクト: lukegb/django-user-sessions
 def test_locations(self):
     self.assertEqual('United States', location('8.8.8.8'))
     self.assertIn('United States', location('44.55.66.77'))
コード例 #10
0
ファイル: tests.py プロジェクト: tbeg/django-user-sessions
 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")
コード例 #11
0
ファイル: tests.py プロジェクト: tbeg/django-user-sessions
 def test_no_location(self):
     self.assertEqual(location("127.0.0.1"), "<i>unknown</i>")