Revision 78c165cf snf-cyclades-app/synnefo/api/test/floating_ips.py
b/snf-cyclades-app/synnefo/api/test/floating_ips.py | ||
---|---|---|
300 | 300 |
ip1_after = FloatingIP.objects.get(id=ip1.id) |
301 | 301 |
self.assertEqual(ip1_after.machine, self.vm) |
302 | 302 |
self.assertTrue(ip1_after.in_use()) |
303 |
self.vm.nics.create(ipv4=ip1_after.ipv4, network=ip1_after.network, |
|
304 |
state="ACTIVE", index=0) |
|
305 |
response = self.get(SERVERS_URL + "/%s" % self.vm.id, |
|
306 |
self.vm.userid) |
|
307 |
self.assertSuccess(response) |
|
308 |
nic = json.loads(response.content)["server"]["attachments"][0] |
|
309 |
self.assertEqual(nic["OS-EXT-IPS:type"], "floating") |
|
303 | 310 |
|
304 | 311 |
@patch('synnefo.logic.rapi_pool.GanetiRapiClient') |
305 | 312 |
def test_remove_floating_ip(self, mock): |
Also available in: Unified diff