]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/tests/utils.py
Replace tab characters with spaces on .py files
[patchwork] / apps / patchwork / tests / utils.py
index a85e168d38753667f4fed458132414ac0c4034f8..35c4beb140e6df7d8a8dba2c5772957c33cbf4aa 100644 (file)
@@ -40,7 +40,7 @@ class defaults(object):
 
     patch_author = 'Patch Author <patch-author@example.com>'
     patch_author_person = Person(name = 'Patch Author',
-                                email = 'patch-author@example.com')
+        email = 'patch-author@example.com')
 
     comment_author = 'Comment Author <comment-author@example.com>'
 
@@ -50,6 +50,12 @@ class defaults(object):
 
     patch_name = 'Test Patch'
 
+    patch = """--- /dev/null   2011-01-01 00:00:00.000000000 +0800
++++ a  2011-01-01 00:00:00.000000000 +0800
+@@ -0,0 +1 @@
++a
+"""
+
 _user_idx = 1
 def create_user():
     global _user_idx
@@ -86,7 +92,7 @@ def find_in_context(context, key):
 def read_patch(filename, encoding = None):
     file_path = os.path.join(_test_patch_dir, filename)
     if encoding is not None:
-       f = codecs.open(file_path, encoding = encoding)
+        f = codecs.open(file_path, encoding = encoding)
     else:
         f = file(file_path)