fix network unit test case

Since neutron code bases was changed because of bug fix [1], network unit
test for the Tricircle has to be updated becuase of dependencies.

For More Detail:
neutron/db/ipam_backend_mixin.py

[1]https://review.openstack.org/#/c/288774/

Change-Id: I1142bdd75c1dd5d240d1d256d9687c2fe54612c8
This commit is contained in:
XiongQiu 2016-05-12 16:24:06 +08:00
parent 333c99ad20
commit 8a9e6498b8

@ -19,6 +19,7 @@ import mock
from mock import patch
import unittest
from sqlalchemy.orm import attributes
from sqlalchemy.orm import exc
from sqlalchemy.sql import elements
@ -499,6 +500,8 @@ class FakeSession(object):
return FakeSession.WithWrapper()
def query(self, model):
if isinstance(model, attributes.InstrumentedAttribute):
model = model.class_
if model.__tablename__ not in RES_MAP:
return FakeQuery([], model.__tablename__)
return FakeQuery(RES_MAP[model.__tablename__],