示例#1
0
文件: tests.py 项目: pombreda/ralph
 def test_get_ip_info_empty(self):
     result = api_pricing.get_ip_info(ipaddress='3.3.3.3')
     self.assertEquals(result, {})
示例#2
0
文件: tests.py 项目: pombreda/ralph
 def test_get_ip_info(self):
     result = api_pricing.get_ip_info(ipaddress='1.1.1.1')
     self.assertEquals(result, {
         'device_id': self.device.id,
         'venture_id': self.venture.id,
     })
示例#3
0
文件: tests.py 项目: pombreda/ralph
 def test_get_ip_info_without_device(self):
     result = api_pricing.get_ip_info(ipaddress='2.2.2.2')
     self.assertEquals(result, {
         'venture_id': self.venture.id,
     })
示例#4
0
文件: tests.py 项目: ReJeCtAll/ralph
 def test_get_ip_info_empty(self):
     result = api_pricing.get_ip_info(ipaddress='3.3.3.3')
     self.assertEquals(result, {})
示例#5
0
文件: tests.py 项目: ReJeCtAll/ralph
 def test_get_ip_info_without_device(self):
     result = api_pricing.get_ip_info(ipaddress='2.2.2.2')
     self.assertEquals(result, {
         'venture_id': self.venture.id,
     })
示例#6
0
文件: tests.py 项目: ReJeCtAll/ralph
 def test_get_ip_info(self):
     result = api_pricing.get_ip_info(ipaddress='1.1.1.1')
     self.assertEquals(result, {
         'device_id': self.device.id,
         'venture_id': self.venture.id,
     })
示例#7
0
文件: tests.py 项目: deejay1/ralph
 def test_get_ip_info_without_device(self):
     result = api_pricing.get_ip_info(ipaddress="2.2.2.2")
     self.assertEquals(result, {"venture_id": self.venture.id})
示例#8
0
文件: tests.py 项目: deejay1/ralph
 def test_get_ip_info(self):
     result = api_pricing.get_ip_info(ipaddress="1.1.1.1")
     self.assertEquals(result, {"device_id": self.device.id, "venture_id": self.venture.id})