'Test against sql injection attack on filters.
Test Plan:
- Attempt to get all entities back by passing a two-term attribute
- Attempt to piggyback filter to damage DB (e.g. drop table)'

def test_filter_sql_injection_attack(self):

    users = self.identity_api.list_users()
    self.assertGreater(len(users), 0)
    hints = driver_hints.Hints()
    hints.add_filter('name', "anything'    or    'x'='x")
    users = self.identity_api.list_users(hints=hints)
    self.assertEqual(0, len(users))
    group = unit.new_group_ref(domain_id=CONF.identity.default_domain_id)
    group = self.identity_api.create_group(group)
    hints = driver_hints.Hints()
    hints.add_filter('name', "x';    drop    table    group")
    groups = self.identity_api.list_groups(hints=hints)
    self.assertEqual(0, len(groups))
    groups = self.identity_api.list_groups()
    self.assertGreater(len(groups), 0)
