← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/lintee-lintee into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/lintee-lintee into lp:maas.

Commit message:
Lots more lint.  Come on people, run "make lint"!

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/maas/lintee-lintee/+merge/126982
-- 
https://code.launchpad.net/~jtv/maas/lintee-lintee/+merge/126982
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/lintee-lintee into lp:maas.
=== modified file 'src/maasserver/tests/test_node.py'
--- src/maasserver/tests/test_node.py	2012-09-28 11:07:48 +0000
+++ src/maasserver/tests/test_node.py	2012-09-28 14:40:27 +0000
@@ -19,7 +19,6 @@
     PermissionDenied,
     ValidationError,
     )
-from django.http import Http404
 from maasserver.enum import (
     ARCHITECTURE,
     DISTRO_SERIES,
@@ -28,10 +27,7 @@
     NODE_STATUS_CHOICES,
     NODE_STATUS_CHOICES_DICT,
     )
-from maasserver.exceptions import (
-    InvalidConstraint,
-    NodeStateViolation,
-    )
+from maasserver.exceptions import NodeStateViolation
 from maasserver.models import (
     Config,
     MACAddress,

=== modified file 'src/maasserver/tests/test_node_constraint_filter.py'
--- src/maasserver/tests/test_node_constraint_filter.py	2012-09-28 11:07:48 +0000
+++ src/maasserver/tests/test_node_constraint_filter.py	2012-09-28 14:40:27 +0000
@@ -13,12 +13,12 @@
 __all__ = []
 
 from maasserver.enum import ARCHITECTURE
-
 from maasserver.exceptions import InvalidConstraint
 from maasserver.models import Node
 from maasserver.models.node_constraint_filter import constrain_nodes
 from maasserver.testing.factory import factory
 from maasserver.testing.testcase import TestCase
+from maasserver.utils import ignore_unused
 
 
 class TestConstrainNodes(TestCase):
@@ -94,6 +94,7 @@
         node_big = factory.make_node(architecture=ARCHITECTURE.i386)
         node_big.tags.add(tag_big)
         node_small = factory.make_node(architecture=ARCHITECTURE.i386)
+        ignore_unused(node_small)
         node_big_arm = factory.make_node(architecture=ARCHITECTURE.armhf)
         node_big_arm.tags.add(tag_big)
         self.assertConstrainedNodes([node_big, node_big_arm],

=== modified file 'src/maasserver/tests/test_tag.py'
--- src/maasserver/tests/test_tag.py	2012-09-28 05:11:12 +0000
+++ src/maasserver/tests/test_tag.py	2012-09-28 14:40:27 +0000
@@ -44,14 +44,14 @@
         self.assertEqual([node.id], [n.id for n in tag.node_set.all()])
 
     def test_valid_tag_names(self):
-        for valid in ['valid-dash', 'under_score', 'long'*50]:
+        for valid in ['valid-dash', 'under_score', 'long' * 50]:
             tag = factory.make_tag(name=valid)
             self.assertEqual(valid, tag.name)
 
     def test_validate_traps_invalid_tag_name(self):
         for invalid in ['invalid:name', 'no spaces', 'no\ttabs',
                         'no&ampersand', 'no!shouting', '',
-                        'too-long'*33, '\xb5']:
+                        'too-long' * 33, '\xb5']:
             self.assertRaises(ValidationError, factory.make_tag, name=invalid)
 
     def test_populate_nodes_applies_tags_to_nodes(self):