]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix and enable H90x tests
authorDirk Mueller <dirk@dmllr.de>
Sun, 9 Jun 2013 11:50:49 +0000 (13:50 +0200)
committerDirk Mueller <dirk@dmllr.de>
Sun, 9 Jun 2013 11:50:49 +0000 (13:50 +0200)
Only triggering in few places that are easy
to fix. Start gating on those checks.

Change-Id: Ib4ff23159bd83fd3455b5357d5338fe37ca23fa2

quantum/plugins/midonet/midonet_lib.py
quantum/policy.py
quantum/tests/unit/nicira/fake_nvpapiclient.py
tox.ini

index 9ad6b94ccf24dac35cacf9940a44af52b505ea9d..8e2c1dfda0460db507394970a0ee00940993bcb0 100644 (file)
@@ -903,7 +903,7 @@ class MidoClient:
         port_group_id = None
 
         # handle source
-        if not remote_ip_prefix is None:
+        if remote_ip_prefix is not None:
             nw_src_address, nw_src_length = remote_ip_prefix.split('/')
         elif not remote_group_id is None:  # security group as a srouce
             source_pg = self.pg_manager.get_for_sg(tenant_id, remote_group_id)
index 05e11ec10339efc053b3d3f819adcb565ba0b2dc..610e4c5b8581669d35c8b09c209fe2a0797391a9 100644 (file)
@@ -99,7 +99,7 @@ def _set_rules(data):
                 for actual_policy in ['_'.join(item) for item in
                                       itertools.product(new_actions,
                                                         new_policies)]:
-                    if not actual_policy in policies:
+                    if actual_policy not in policies:
                         # New policy, same rule
                         LOG.info(_("Inserting policy:%(new_policy)s in place "
                                    "of deprecated policy:%(old_policy)s"),
index d29d237d069a1f0616446f6179e081a3906db352..40ac6e853db3ba3ed59f59a2fbb83a96d141e9bb 100644 (file)
@@ -260,7 +260,7 @@ class FakeClient:
         return fake_gwservice
 
     def _build_relation(self, src, dst, resource_type, relation):
-        if not relation in self.MANAGED_RELATIONS[resource_type]:
+        if relation not in self.MANAGED_RELATIONS[resource_type]:
             return  # Relation is not desired in output
         if not '_relations' in src or not src['_relations'].get(relation):
             return  # Item does not have relation
diff --git a/tox.ini b/tox.ini
index 51489953408982dd699d54e4e7d307860a599732..d111aeeb891ee79f7eb2c7f172fb650ea3c159b4 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -36,8 +36,7 @@ commands = {posargs}
 # H301 one import per line
 # H302 import only modules
 # TODO(marun) H404 multi line docstring should start with a summary
-# TODO(marun) H901,902 use the not operator inline for clarity
-ignore = E711,E712,E125,H301,H302,H404,H901,H902
+ignore = E711,E712,E125,H301,H302,H404
 show-source = true
 builtins = _
 exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools