Need to use router in test_db_plugin

asked 2015-02-11 15:23:39 -0500

Alexander Chadin gravatar image

updated 2015-02-11 15:30:03 -0500

I have imported L3NatTestCaseMixin into test_db_firewall and inherited TestFirewallDBPlugin from it. Then i've used self.router() in _test_create_firewall

def _test_create_firewall(self, attrs):
        with self.firewall_policy() as fwp:
            fwp_id = fwp['firewall_policy']['id']
            attrs['firewall_policy_id'] = fwp_id
            with self.router() as r:
                with self.firewall(name=attrs['name'],
                                   firewall_policy_id=fwp_id,
                                   admin_state_up=
                                   ADMIN_STATE_UP,
                                   router_ids=r['id']
                                   ) as firewall:
                    for k, v in attrs.iteritems():
                        self.assertEqual(firewall['firewall'][k], v)

self.router() returns:

404 Not Found
Content-Length: 52
Content-Type: text/plain; charset=UTF-8

404 Not Found

The resource could not be found.

Are there any thoughts?

edit retag flag offensive close merge delete