← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rvb/maas/maas-lint-header into lp:maas

 

Raphaël Badin has proposed merging lp:~rvb/maas/maas-lint-header into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~rvb/maas/maas-lint-header/+merge/98905

This branch fixes some lint.
-- 
https://code.launchpad.net/~rvb/maas/maas-lint-header/+merge/98905
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-lint-header into lp:maas.
=== modified file 'src/maasserver/migrations/0002_macaddress_unique.py'
--- src/maasserver/migrations/0002_macaddress_unique.py	2012-03-22 11:56:17 +0000
+++ src/maasserver/migrations/0002_macaddress_unique.py	2012-03-22 19:09:27 +0000
@@ -1,8 +1,28 @@
+# Copyright 2012 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Maasserver migration 0002_macaddress_unique."""
+
+from __future__ import (
+    print_function,
+    # This breaks South.
+    #unicode_literals,
+    )
+
+__metaclass__ = type
+__all__ = []
+
+# flake8: noqa
+# SKIP this file when reformatting.
+# The rest of this file was generated by South.
+
 # encoding: utf-8
 import datetime
+
+from django.db import models
 from south.db import db
 from south.v2 import SchemaMigration
-from django.db import models
+
 
 class Migration(SchemaMigration):
 

=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py	2012-03-22 17:10:40 +0000
+++ src/maasserver/tests/test_api.py	2012-03-22 19:09:27 +0000
@@ -212,8 +212,9 @@
         mac = 'aa:bb:cc:dd:ee:ff'
         factory.make_mac_address(mac)
         architecture = factory.getRandomChoice(ARCHITECTURE_CHOICES)
+
         def node_created(sender, instance, created, **kwargs):
-            self.assertFalse(True)
+            self.fail("post_save should not have been called")
         post_save.connect(node_created, sender=Node)
         self.client.post(
             self.get_uri('nodes/'),
@@ -707,7 +708,7 @@
             token=second_token)
 
         user_2 = factory.make_user()
-        user_2_token = create_auth_token(user_2)
+        create_auth_token(user_2)
         factory.make_node(
             owner=self.logged_in_user, status=NODE_STATUS.ALLOCATED,
             token=second_token)
@@ -887,7 +888,7 @@
     def test_macs_DELETE_not_found(self):
         # When deleting a MAC Address, the api returns a 'Not Found' (404)
         # error if no existing MAC Address is found.
-        node  = factory.make_node()
+        node = factory.make_node()
         response = self.client.delete(
             self.get_uri('nodes/%s/macs/%s/') % (
                 node.system_id, '00-aa-22-cc-44-dd'))
@@ -897,7 +898,7 @@
     def test_macs_DELETE_bad_request(self):
         # When deleting a MAC Address, the api returns a 'Bad Request' (400)
         # error if the provided MAC Address is not valid.
-        node  = factory.make_node()
+        node = factory.make_node()
         response = self.client.delete(
             self.get_uri('nodes/%s/macs/%s/') % (
                 node.system_id, 'invalid-mac'))