vmware-nsx/quantum/tests/unit/midonet
zhhuabj de5c1e4f28 Make "shared" filter more compatible with diff DBs
For the type BOOLEAN, in sqlalchemy,
it's mapped to BOOLEAN type if the backend database supports it,
otherwise, it's mapped to one of the Integer types, like SMALLINT,
and restrict the values to 1(True) and 0(False).

query_filter = (... | model.shared))
The above filter will generate a SQL where clause like:
where ... OR xxx.shared

This is not supported in databases which don't support BOOLEAN type.
Change it as below to make it more compatible:
query_filter = (... | model.shared == True))

It will generate a SQL where clause as below:
where ... OR xxx.shared = ?

In Python, True == 1, so this change is compatible
with both databases supporting BOOLEAN and those not supporting it.

Fix bug 1161195

Change-Id: Ic0ce0816d63b576a3469de0ed92cae4b19a3690e
2013-04-10 18:10:23 +08:00
..
__init__.py Implement MidoNet Quantum Plugin 2013-02-20 10:20:20 +09:00
test_midonet_lib.py Merge "Add common test base class to hold common things." 2013-03-06 03:15:50 +00:00
test_midonet_plugin.py Make "shared" filter more compatible with diff DBs 2013-04-10 18:10:23 +08:00