Revision 1f638a85 snf-cyclades-app/synnefo/api/test/servers.py

b/snf-cyclades-app/synnefo/api/test/servers.py
118 118
        db_vm = self.vm2
119 119
        user = self.vm2.userid
120 120
        net = mfactory.NetworkFactory()
121
        nic = mfactory.NetworkInterfaceFactory(machine=self.vm2, network=net)
121
        nic = mfactory.NetworkInterfaceFactory(machine=self.vm2, network=net,
122
                                              ipv6="::babe")
122 123

  
123 124
        db_vm_meta = mfactory.VirtualMachineMetadataFactory(vm=db_vm)
124 125

  
......
138 139
        self.assertEqual(api_nic['ipv4'], nic.ipv4)
139 140
        self.assertEqual(api_nic['ipv6'], nic.ipv6)
140 141
        self.assertEqual(api_nic['id'], 'nic-%s-%s' % (db_vm.id, nic.index))
142
        api_address = server["addresses"]
143
        self.assertEqual(api_address[str(net.id)],
144
                          [{"version": 4, "addr": nic.ipv4},
145
                           {"version": 6, "addr": nic.ipv6}])
141 146

  
142 147
        metadata = server['metadata']
143 148
        self.assertEqual(len(metadata), 1)

Also available in: Unified diff