']
)
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py
index 7724578e2a9..a0284045bc6 100644
--- a/tests/file_uploads/tests.py
+++ b/tests/file_uploads/tests.py
@@ -377,8 +377,7 @@ class FileUploadTests(TestCase):
vars = {'boundary': 'oUrBoUnDaRyStRiNg'}
post_data = [
'--%(boundary)s',
- 'Content-Disposition: form-data; name="file_field"; '
- 'filename="MiXeD_cAsE.txt"',
+ 'Content-Disposition: form-data; name="file_field"; filename="MiXeD_cAsE.txt"',
'Content-Type: application/octet-stream',
'',
'file contents\n'
diff --git a/tests/forms_tests/tests/test_fields.py b/tests/forms_tests/tests/test_fields.py
index e04b0609167..4c787b1f2f3 100644
--- a/tests/forms_tests/tests/test_fields.py
+++ b/tests/forms_tests/tests/test_fields.py
@@ -1134,14 +1134,14 @@ class FieldsTests(SimpleTestCase):
f.choices = [p for p in f.choices if p[0].endswith('.py')]
f.choices.sort()
expected = [
- ('/django/forms/__init__.py', '__init__.py'),
- ('/django/forms/fields.py', 'fields.py'),
- ('/django/forms/forms.py', 'forms.py'),
- ('/django/forms/formsets.py', 'formsets.py'),
- ('/django/forms/models.py', 'models.py'),
- ('/django/forms/util.py', 'util.py'),
- ('/django/forms/utils.py', 'utils.py'),
- ('/django/forms/widgets.py', 'widgets.py')
+ ('/django/forms/__init__.py', '__init__.py'),
+ ('/django/forms/fields.py', 'fields.py'),
+ ('/django/forms/forms.py', 'forms.py'),
+ ('/django/forms/formsets.py', 'formsets.py'),
+ ('/django/forms/models.py', 'models.py'),
+ ('/django/forms/util.py', 'util.py'),
+ ('/django/forms/utils.py', 'utils.py'),
+ ('/django/forms/widgets.py', 'widgets.py')
]
for exp, got in zip(expected, fix_os_paths(f.choices)):
self.assertEqual(exp[1], got[1])
@@ -1155,14 +1155,14 @@ class FieldsTests(SimpleTestCase):
f = FilePathField(path=path, match='^.*?\.py$')
f.choices.sort()
expected = [
- ('/django/forms/__init__.py', '__init__.py'),
- ('/django/forms/fields.py', 'fields.py'),
- ('/django/forms/forms.py', 'forms.py'),
- ('/django/forms/formsets.py', 'formsets.py'),
- ('/django/forms/models.py', 'models.py'),
- ('/django/forms/util.py', 'util.py'),
- ('/django/forms/utils.py', 'utils.py'),
- ('/django/forms/widgets.py', 'widgets.py')
+ ('/django/forms/__init__.py', '__init__.py'),
+ ('/django/forms/fields.py', 'fields.py'),
+ ('/django/forms/forms.py', 'forms.py'),
+ ('/django/forms/formsets.py', 'formsets.py'),
+ ('/django/forms/models.py', 'models.py'),
+ ('/django/forms/util.py', 'util.py'),
+ ('/django/forms/utils.py', 'utils.py'),
+ ('/django/forms/widgets.py', 'widgets.py')
]
for exp, got in zip(expected, fix_os_paths(f.choices)):
self.assertEqual(exp[1], got[1])
@@ -1174,16 +1174,16 @@ class FieldsTests(SimpleTestCase):
f = FilePathField(path=path, recursive=True, match='^.*?\.py$')
f.choices.sort()
expected = [
- ('/django/forms/__init__.py', '__init__.py'),
- ('/django/forms/extras/__init__.py', 'extras/__init__.py'),
- ('/django/forms/extras/widgets.py', 'extras/widgets.py'),
- ('/django/forms/fields.py', 'fields.py'),
- ('/django/forms/forms.py', 'forms.py'),
- ('/django/forms/formsets.py', 'formsets.py'),
- ('/django/forms/models.py', 'models.py'),
- ('/django/forms/util.py', 'util.py'),
- ('/django/forms/utils.py', 'utils.py'),
- ('/django/forms/widgets.py', 'widgets.py')
+ ('/django/forms/__init__.py', '__init__.py'),
+ ('/django/forms/extras/__init__.py', 'extras/__init__.py'),
+ ('/django/forms/extras/widgets.py', 'extras/widgets.py'),
+ ('/django/forms/fields.py', 'fields.py'),
+ ('/django/forms/forms.py', 'forms.py'),
+ ('/django/forms/formsets.py', 'formsets.py'),
+ ('/django/forms/models.py', 'models.py'),
+ ('/django/forms/util.py', 'util.py'),
+ ('/django/forms/utils.py', 'utils.py'),
+ ('/django/forms/widgets.py', 'widgets.py')
]
for exp, got in zip(expected, fix_os_paths(f.choices)):
self.assertEqual(exp[1], got[1])
diff --git a/tests/forms_tests/tests/test_widgets.py b/tests/forms_tests/tests/test_widgets.py
index 9cb36d66a2f..22c2d4258ba 100644
--- a/tests/forms_tests/tests/test_widgets.py
+++ b/tests/forms_tests/tests/test_widgets.py
@@ -1182,9 +1182,9 @@ class ClearableFileInputTests(TestCase):
widget = ClearableFileInput()
widget.is_required = False
self.assertEqual(widget.value_from_datadict(
- data={'myfile-clear': True},
- files={},
- name='myfile'), False)
+ data={'myfile-clear': True},
+ files={},
+ name='myfile'), False)
def test_clear_input_checked_returns_false_only_if_not_required(self):
"""
@@ -1196,6 +1196,6 @@ class ClearableFileInputTests(TestCase):
widget.is_required = True
f = SimpleUploadedFile('something.txt', b'content')
self.assertEqual(widget.value_from_datadict(
- data={'myfile-clear': True},
- files={'myfile': f},
- name='myfile'), f)
+ data={'myfile-clear': True},
+ files={'myfile': f},
+ name='myfile'), f)
diff --git a/tests/forms_tests/tests/tests.py b/tests/forms_tests/tests/tests.py
index 256036dbadc..361f2dc866e 100644
--- a/tests/forms_tests/tests/tests.py
+++ b/tests/forms_tests/tests/tests.py
@@ -124,10 +124,10 @@ class ModelFormCallableModelDefault(TestCase):
obj2 = ChoiceOptionModel.objects.create(id=2, name='option 2')
obj3 = ChoiceOptionModel.objects.create(id=3, name='option 3')
self.assertHTMLEqual(ChoiceFieldForm(initial={
- 'choice': obj2,
- 'choice_int': obj2,
- 'multi_choice': [obj2,obj3],
- 'multi_choice_int': ChoiceOptionModel.objects.exclude(name="default"),
+ 'choice': obj2,
+ 'choice_int': obj2,
+ 'multi_choice': [obj2,obj3],
+ 'multi_choice_int': ChoiceOptionModel.objects.exclude(name="default"),
}).as_p(), """ ''' % (w_woodward.pk, w_royko.pk, c1.pk, c2.pk, c3.pk))
f = TestArticleForm({
- 'headline': 'Test headline',
- 'slug': 'test-headline',
- 'pub_date': '1984-02-06',
- 'writer': six.text_type(w_royko.pk),
- 'article': 'Hello.'
+ 'headline': 'Test headline',
+ 'slug': 'test-headline',
+ 'pub_date': '1984-02-06',
+ 'writer': six.text_type(w_royko.pk),
+ 'article': 'Hello.'
}, instance=art)
self.assertEqual(f.errors, {})
self.assertEqual(f.is_valid(), True)
@@ -999,9 +999,9 @@ class OldFormForXTests(TestCase):
# You can create a form over a subset of the available fields
# by specifying a 'fields' argument to form_for_instance.
f = PartialArticleFormWithSlug({
- 'headline': 'New headline',
- 'slug': 'new-headline',
- 'pub_date': '1988-01-04'
+ 'headline': 'New headline',
+ 'slug': 'new-headline',
+ 'pub_date': '1988-01-04'
}, auto_id=False, instance=art)
self.assertHTMLEqual(f.as_ul(), '''
Headline:
Slug:
@@ -1040,11 +1040,11 @@ class OldFormForXTests(TestCase):
# Initial values can be provided for model forms
f = TestArticleForm(
- auto_id=False,
- initial={
- 'headline': 'Your headline here',
- 'categories': [str(c1.id), str(c2.id)]
- })
+ auto_id=False,
+ initial={
+ 'headline': 'Your headline here',
+ 'categories': [str(c1.id), str(c2.id)]
+ })
self.assertHTMLEqual(f.as_ul(), '''Headline:
Slug:
Pub date:
@@ -1067,12 +1067,12 @@ class OldFormForXTests(TestCase):
''' % (w_woodward.pk, w_royko.pk, c1.pk, c2.pk, c3.pk))
f = TestArticleForm({
- 'headline': 'New headline',
- 'slug': 'new-headline',
- 'pub_date': '1988-01-04',
- 'writer': six.text_type(w_royko.pk),
- 'article': 'Hello.',
- 'categories': [six.text_type(c1.id), six.text_type(c2.id)]
+ 'headline': 'New headline',
+ 'slug': 'new-headline',
+ 'pub_date': '1988-01-04',
+ 'writer': six.text_type(w_royko.pk),
+ 'article': 'Hello.',
+ 'categories': [six.text_type(c1.id), six.text_type(c2.id)]
}, instance=new_art)
new_art = f.save()
self.assertEqual(new_art.id == art_id_1, True)
@@ -1388,8 +1388,8 @@ class OldFormForXTests(TestCase):
# Upload a file and ensure it all works as expected.
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test1.txt', b'hello world')})
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test1.txt', b'hello world')})
self.assertEqual(f.is_valid(), True)
self.assertEqual(type(f.cleaned_data['file']), SimpleUploadedFile)
instance = f.save()
@@ -1397,8 +1397,8 @@ class OldFormForXTests(TestCase):
instance.file.delete()
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test1.txt', b'hello world')})
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test1.txt', b'hello world')})
self.assertEqual(f.is_valid(), True)
self.assertEqual(type(f.cleaned_data['file']), SimpleUploadedFile)
instance = f.save()
@@ -1406,16 +1406,16 @@ class OldFormForXTests(TestCase):
# Check if the max_length attribute has been inherited from the model.
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test-maxlength.txt', b'hello world')})
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test-maxlength.txt', b'hello world')})
self.assertEqual(f.is_valid(), False)
# Edit an instance that already has the file defined in the model. This will not
# save the file again, but leave it exactly as it is.
f = TextFileForm(
- data={'description': 'Assistance'},
- instance=instance)
+ data={'description': 'Assistance'},
+ instance=instance)
self.assertEqual(f.is_valid(), True)
self.assertEqual(f.cleaned_data['file'].name, 'tests/test1.txt')
instance = f.save()
@@ -1427,8 +1427,8 @@ class OldFormForXTests(TestCase):
# Override the file by uploading a new one.
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test2.txt', b'hello world')}, instance=instance)
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test2.txt', b'hello world')}, instance=instance)
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.file.name, 'tests/test2.txt')
@@ -1436,8 +1436,8 @@ class OldFormForXTests(TestCase):
# Delete the current file since this is not done by Django.
instance.file.delete()
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test2.txt', b'hello world')})
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test2.txt', b'hello world')})
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.file.name, 'tests/test2.txt')
@@ -1455,8 +1455,8 @@ class OldFormForXTests(TestCase):
self.assertEqual(instance.file.name, '')
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test3.txt', b'hello world')}, instance=instance)
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test3.txt', b'hello world')}, instance=instance)
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.file.name, 'tests/test3.txt')
@@ -1464,8 +1464,8 @@ class OldFormForXTests(TestCase):
# Instance can be edited w/out re-uploading the file and existing file should be preserved.
f = TextFileForm(
- data={'description': 'New Description'},
- instance=instance)
+ data={'description': 'New Description'},
+ instance=instance)
f.fields['file'].required = False
self.assertEqual(f.is_valid(), True)
instance = f.save()
@@ -1477,8 +1477,8 @@ class OldFormForXTests(TestCase):
instance.delete()
f = TextFileForm(
- data={'description': 'Assistance'},
- files={'file': SimpleUploadedFile('test3.txt', b'hello world')})
+ data={'description': 'Assistance'},
+ files={'file': SimpleUploadedFile('test3.txt', b'hello world')})
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.file.name, 'tests/test3.txt')
@@ -1511,8 +1511,8 @@ class OldFormForXTests(TestCase):
image_data2 = fp.read()
f = ImageFileForm(
- data={'description': 'An image'},
- files={'image': SimpleUploadedFile('test.png', image_data)})
+ data={'description': 'An image'},
+ files={'image': SimpleUploadedFile('test.png', image_data)})
self.assertEqual(f.is_valid(), True)
self.assertEqual(type(f.cleaned_data['image']), SimpleUploadedFile)
instance = f.save()
@@ -1524,8 +1524,8 @@ class OldFormForXTests(TestCase):
# because the dimension fields are not null=True.
instance.image.delete(save=False)
f = ImageFileForm(
- data={'description': 'An image'},
- files={'image': SimpleUploadedFile('test.png', image_data)})
+ data={'description': 'An image'},
+ files={'image': SimpleUploadedFile('test.png', image_data)})
self.assertEqual(f.is_valid(), True)
self.assertEqual(type(f.cleaned_data['image']), SimpleUploadedFile)
instance = f.save()
@@ -1550,8 +1550,8 @@ class OldFormForXTests(TestCase):
# Override the file by uploading a new one.
f = ImageFileForm(
- data={'description': 'Changed it'},
- files={'image': SimpleUploadedFile('test2.png', image_data2)}, instance=instance)
+ data={'description': 'Changed it'},
+ files={'image': SimpleUploadedFile('test2.png', image_data2)}, instance=instance)
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.image.name, 'tests/test2.png')
@@ -1564,8 +1564,8 @@ class OldFormForXTests(TestCase):
instance.delete()
f = ImageFileForm(
- data={'description': 'Changed it'},
- files={'image': SimpleUploadedFile('test2.png', image_data2)})
+ data={'description': 'Changed it'},
+ files={'image': SimpleUploadedFile('test2.png', image_data2)})
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.image.name, 'tests/test2.png')
@@ -1593,8 +1593,8 @@ class OldFormForXTests(TestCase):
self.assertEqual(instance.height, None)
f = OptionalImageFileForm(
- data={'description': 'And a final one'},
- files={'image': SimpleUploadedFile('test3.png', image_data)}, instance=instance)
+ data={'description': 'And a final one'},
+ files={'image': SimpleUploadedFile('test3.png', image_data)}, instance=instance)
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.image.name, 'tests/test3.png')
@@ -1603,8 +1603,8 @@ class OldFormForXTests(TestCase):
# Editing the instance without re-uploading the image should not affect the image or its width/height properties
f = OptionalImageFileForm(
- data={'description': 'New Description'},
- instance=instance)
+ data={'description': 'New Description'},
+ instance=instance)
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.description, 'New Description')
@@ -1617,8 +1617,8 @@ class OldFormForXTests(TestCase):
instance.delete()
f = OptionalImageFileForm(
- data={'description': 'And a final one'},
- files={'image': SimpleUploadedFile('test4.png', image_data2)}
+ data={'description': 'And a final one'},
+ files={'image': SimpleUploadedFile('test4.png', image_data2)}
)
self.assertEqual(f.is_valid(), True)
instance = f.save()
@@ -1628,8 +1628,8 @@ class OldFormForXTests(TestCase):
instance.delete()
# Test callable upload_to behavior that's dependent on the value of another field in the model
f = ImageFileForm(
- data={'description': 'And a final one', 'path': 'foo'},
- files={'image': SimpleUploadedFile('test4.png', image_data)})
+ data={'description': 'And a final one', 'path': 'foo'},
+ files={'image': SimpleUploadedFile('test4.png', image_data)})
self.assertEqual(f.is_valid(), True)
instance = f.save()
self.assertEqual(instance.image.name, 'foo/test4.png')
diff --git a/tests/model_formsets_regress/tests.py b/tests/model_formsets_regress/tests.py
index 3fd41dddb04..844e1f2820f 100644
--- a/tests/model_formsets_regress/tests.py
+++ b/tests/model_formsets_regress/tests.py
@@ -369,25 +369,25 @@ class FormfieldShouldDeleteFormTests(TestCase):
DeleteFormset = modelformset_factory(User, form=CustomDeleteUserForm, formset=BaseCustomDeleteModelFormSet)
data = {
- 'form-TOTAL_FORMS': '4',
- 'form-INITIAL_FORMS': '0',
- 'form-MAX_NUM_FORMS': '4',
- 'form-0-username': 'John',
- 'form-0-serial': '1',
- 'form-1-username': 'Paul',
- 'form-1-serial': '2',
- 'form-2-username': 'George',
- 'form-2-serial': '3',
- 'form-3-username': 'Ringo',
- 'form-3-serial': '5',
- }
+ 'form-TOTAL_FORMS': '4',
+ 'form-INITIAL_FORMS': '0',
+ 'form-MAX_NUM_FORMS': '4',
+ 'form-0-username': 'John',
+ 'form-0-serial': '1',
+ 'form-1-username': 'Paul',
+ 'form-1-serial': '2',
+ 'form-2-username': 'George',
+ 'form-2-serial': '3',
+ 'form-3-username': 'Ringo',
+ 'form-3-serial': '5',
+ }
delete_all_ids = {
- 'form-0-DELETE': '1',
- 'form-1-DELETE': '1',
- 'form-2-DELETE': '1',
- 'form-3-DELETE': '1',
- }
+ 'form-0-DELETE': '1',
+ 'form-1-DELETE': '1',
+ 'form-2-DELETE': '1',
+ 'form-3-DELETE': '1',
+ }
def test_init_database(self):
""" Add test data to database via formset """
diff --git a/tests/model_inheritance_regress/models.py b/tests/model_inheritance_regress/models.py
index bf076a47c64..6f54dbd650f 100644
--- a/tests/model_inheritance_regress/models.py
+++ b/tests/model_inheritance_regress/models.py
@@ -123,8 +123,8 @@ class DerivedM(BaseM):
derived_name = models.CharField(max_length=100)
def __str__(self):
- return "PK = %d, base_name = %s, derived_name = %s" \
- % (self.customPK, self.base_name, self.derived_name)
+ return "PK = %d, base_name = %s, derived_name = %s" % (
+ self.customPK, self.base_name, self.derived_name)
class AuditBase(models.Model):
planned_date = models.DateField()
diff --git a/tests/model_inheritance_regress/tests.py b/tests/model_inheritance_regress/tests.py
index 3f903c506ba..cd77085fbb0 100644
--- a/tests/model_inheritance_regress/tests.py
+++ b/tests/model_inheritance_regress/tests.py
@@ -385,8 +385,8 @@ class ModelInheritanceTest(TestCase):
# abstract models in the inheritance chain, for consistency with
# verbose_name.
self.assertEqual(
- InternalCertificationAudit._meta.verbose_name_plural,
- 'Audits'
+ InternalCertificationAudit._meta.verbose_name_plural,
+ 'Audits'
)
def test_inherited_nullable_exclude(self):
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
index 7b901ae3270..b631018828a 100644
--- a/tests/model_regress/tests.py
+++ b/tests/model_regress/tests.py
@@ -121,16 +121,16 @@ class ModelTests(TestCase):
# Regression test for #18969
self.assertQuerysetEqual(
- Party.objects.filter(when__year=1), [
- datetime.date(1, 3, 3),
- ],
- attrgetter("when")
+ Party.objects.filter(when__year=1), [
+ datetime.date(1, 3, 3),
+ ],
+ attrgetter("when")
)
self.assertQuerysetEqual(
- Party.objects.filter(when__year='1'), [
- datetime.date(1, 3, 3),
- ],
- attrgetter("when")
+ Party.objects.filter(when__year='1'), [
+ datetime.date(1, 3, 3),
+ ],
+ attrgetter("when")
)
if (3,) <= sys.version_info < (3, 3) and connection.vendor == 'mysql':
diff --git a/tests/null_queries/tests.py b/tests/null_queries/tests.py
index 0d814a38344..e442479cd79 100644
--- a/tests/null_queries/tests.py
+++ b/tests/null_queries/tests.py
@@ -28,11 +28,11 @@ class NullQueriesTests(TestCase):
# Excluding the previous result returns everything.
self.assertQuerysetEqual(
- Choice.objects.exclude(choice=None).order_by('id'),
- [
- '',
- ''
- ]
+ Choice.objects.exclude(choice=None).order_by('id'),
+ [
+ '',
+ ''
+ ]
)
# Valid query, but fails because foo isn't a keyword
diff --git a/tests/pagination/tests.py b/tests/pagination/tests.py
index d4ef2721170..000ef0450a3 100644
--- a/tests/pagination/tests.py
+++ b/tests/pagination/tests.py
@@ -248,11 +248,11 @@ class ModelPaginationTests(TestCase):
p = paginator.page(1)
self.assertEqual("", six.text_type(p))
self.assertQuerysetEqual(p.object_list, [
- "",
- "",
- "",
- "",
- ""
+ "",
+ "",
+ "",
+ "",
+ ""
],
ordered=False
)
@@ -269,10 +269,10 @@ class ModelPaginationTests(TestCase):
p = paginator.page(2)
self.assertEqual("", six.text_type(p))
self.assertQuerysetEqual(p.object_list, [
- "",
- "",
- "",
- ""
+ "",
+ "",
+ "",
+ ""
],
ordered=False
)
@@ -302,8 +302,8 @@ class ModelPaginationTests(TestCase):
# Make sure slicing the Page object with numbers and slice objects work.
self.assertEqual(p[0], Article.objects.get(headline='Article 1'))
self.assertQuerysetEqual(p[slice(2)], [
- "",
- "",
+ "",
+ "",
]
)
# After __getitem__ is called, object_list is a list
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index 4d1b9d36038..952f4eae2f9 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -540,7 +540,7 @@ class Queries1Tests(BaseQuerysetTest):
['']
)
self.assertQuerysetEqual(
- Author.objects.filter(Q(extra__note=self.n1)|Q(item__note=self.n3)).filter(id=self.a1.id),
+ Author.objects.filter(Q(extra__note=self.n1)|Q(item__note=self.n3)).filter(id=self.a1.id),
['']
)
diff --git a/tests/requests/tests.py b/tests/requests/tests.py
index aac36442fdb..79a3c45b3a3 100644
--- a/tests/requests/tests.py
+++ b/tests/requests/tests.py
@@ -298,12 +298,12 @@ class RequestsTests(SimpleTestCase):
# we don't want the data held in memory twice, and we don't want to
# silence the error by setting body = '' either.
payload = FakePayload("\r\n".join([
- '--boundary',
- 'Content-Disposition: form-data; name="name"',
- '',
- 'value',
- '--boundary--'
- '']))
+ '--boundary',
+ 'Content-Disposition: form-data; name="name"',
+ '',
+ 'value',
+ '--boundary--'
+ '']))
request = WSGIRequest({'REQUEST_METHOD': 'POST',
'CONTENT_TYPE': 'multipart/form-data; boundary=boundary',
'CONTENT_LENGTH': len(payload),
@@ -320,12 +320,12 @@ class RequestsTests(SimpleTestCase):
# being a binary upload, in which case it should still be accessible
# via body.
payload_data = b"\r\n".join([
- b'--boundary',
- b'Content-ID: id; name="name"',
- b'',
- b'value',
- b'--boundary--'
- b''])
+ b'--boundary',
+ b'Content-ID: id; name="name"',
+ b'',
+ b'value',
+ b'--boundary--'
+ b''])
payload = FakePayload(payload_data)
request = WSGIRequest({'REQUEST_METHOD': 'POST',
'CONTENT_TYPE': 'multipart/related; boundary=boundary',
@@ -343,12 +343,12 @@ class RequestsTests(SimpleTestCase):
# Every request.POST with Content-Length >= 0 is a valid request,
# this test ensures that we handle Content-Length == 0.
payload = FakePayload("\r\n".join([
- '--boundary',
- 'Content-Disposition: form-data; name="name"',
- '',
- 'value',
- '--boundary--'
- '']))
+ '--boundary',
+ 'Content-Disposition: form-data; name="name"',
+ '',
+ 'value',
+ '--boundary--'
+ '']))
request = WSGIRequest({'REQUEST_METHOD': 'POST',
'CONTENT_TYPE': 'multipart/form-data; boundary=boundary',
'CONTENT_LENGTH': 0,
@@ -413,12 +413,12 @@ class RequestsTests(SimpleTestCase):
the stream is read second. Using multipart/form-data instead of urlencoded.
"""
payload = FakePayload("\r\n".join([
- '--boundary',
- 'Content-Disposition: form-data; name="name"',
- '',
- 'value',
- '--boundary--'
- '']))
+ '--boundary',
+ 'Content-Disposition: form-data; name="name"',
+ '',
+ 'value',
+ '--boundary--'
+ '']))
request = WSGIRequest({'REQUEST_METHOD': 'POST',
'CONTENT_TYPE': 'multipart/form-data; boundary=boundary',
'CONTENT_LENGTH': len(payload),
diff --git a/tests/reverse_single_related/tests.py b/tests/reverse_single_related/tests.py
index 472a3026b69..fd1a5196fe0 100644
--- a/tests/reverse_single_related/tests.py
+++ b/tests/reverse_single_related/tests.py
@@ -19,8 +19,8 @@ class ReverseSingleRelatedTests(TestCase):
# Only one source is available via all() due to the custom default manager.
self.assertQuerysetEqual(
- Source.objects.all(),
- [""]
+ Source.objects.all(),
+ [""]
)
self.assertEqual(public_item.source, public_source)
diff --git a/tests/select_related_regress/tests.py b/tests/select_related_regress/tests.py
index 9982f87ffeb..59f4c0d94e5 100644
--- a/tests/select_related_regress/tests.py
+++ b/tests/select_related_regress/tests.py
@@ -96,8 +96,8 @@ class SelectRelatedRegressTests(TestCase):
Item.objects.create(name="item2")
self.assertQuerysetEqual(
- Item.objects.select_related("child").order_by("name"),
- ["", ""]
+ Item.objects.select_related("child").order_by("name"),
+ ["", ""]
)
def test_regression_12851(self):
diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py
index ad0d19433fd..d036c88f405 100644
--- a/tests/serializers_regress/tests.py
+++ b/tests/serializers_regress/tests.py
@@ -556,10 +556,8 @@ def naturalKeyTest(format, self):
self.assertEqual(books[1].object.pk, None)
-for format in [
- f for f in serializers.get_serializer_formats()
- if not isinstance(serializers.get_serializer(f), serializers.BadSerializer)
-]:
+for format in [f for f in serializers.get_serializer_formats()
+ if not isinstance(serializers.get_serializer(f), serializers.BadSerializer)]:
setattr(SerializerTests, 'test_' + format + '_serializer', curry(serializerTest, format))
setattr(SerializerTests, 'test_' + format + '_natural_key_serializer', curry(naturalKeySerializerTest, format))
setattr(SerializerTests, 'test_' + format + '_serializer_fields', curry(fieldsTest, format))
diff --git a/tests/signing/tests.py b/tests/signing/tests.py
index 8b470b9a388..3486cf05911 100644
--- a/tests/signing/tests.py
+++ b/tests/signing/tests.py
@@ -31,8 +31,8 @@ class TestSigner(TestCase):
signer = signing.Signer('predictable-secret', salt='extra-salt')
self.assertEqual(
signer.signature('hello'),
- signing.base64_hmac('extra-salt' + 'signer',
- 'hello', 'predictable-secret').decode()
+ signing.base64_hmac('extra-salt' + 'signer',
+ 'hello', 'predictable-secret').decode()
)
self.assertNotEqual(
signing.Signer('predictable-secret', salt='one').signature('hello'),
diff --git a/tests/template_tests/test_loaders.py b/tests/template_tests/test_loaders.py
index 8acfe93a19b..ebdac4b9c42 100644
--- a/tests/template_tests/test_loaders.py
+++ b/tests/template_tests/test_loaders.py
@@ -111,7 +111,7 @@ class CachedLoader(unittest.TestCase):
self.old_TEMPLATE_LOADERS = settings.TEMPLATE_LOADERS
settings.TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
- 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.filesystem.Loader',
)
),
)
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py
index 11e31c91802..e8a9ee8a894 100644
--- a/tests/template_tests/test_response.py
+++ b/tests/template_tests/test_response.py
@@ -150,8 +150,8 @@ class SimpleTemplateResponseTest(TestCase):
# Create a template response. The context is
# known to be unpickleable (e.g., a function).
response = SimpleTemplateResponse('first/test.html', {
- 'value': 123,
- 'fn': datetime.now,
+ 'value': 123,
+ 'fn': datetime.now,
})
self.assertRaises(ContentNotRenderedError,
pickle.dumps, response)
@@ -178,8 +178,8 @@ class SimpleTemplateResponseTest(TestCase):
def test_repickling(self):
response = SimpleTemplateResponse('first/test.html', {
- 'value': 123,
- 'fn': datetime.now,
+ 'value': 123,
+ 'fn': datetime.now,
})
self.assertRaises(ContentNotRenderedError,
pickle.dumps, response)
@@ -191,8 +191,8 @@ class SimpleTemplateResponseTest(TestCase):
def test_pickling_cookie(self):
response = SimpleTemplateResponse('first/test.html', {
- 'value': 123,
- 'fn': datetime.now,
+ 'value': 123,
+ 'fn': datetime.now,
})
response.cookies['key'] = 'value'
@@ -284,8 +284,8 @@ class TemplateResponseTest(TestCase):
def test_repickling(self):
response = SimpleTemplateResponse('first/test.html', {
- 'value': 123,
- 'fn': datetime.now,
+ 'value': 123,
+ 'fn': datetime.now,
})
self.assertRaises(ContentNotRenderedError,
pickle.dumps, response)
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py
index 97c193fd6e5..99c90d74df2 100644
--- a/tests/test_client_regress/tests.py
+++ b/tests/test_client_regress/tests.py
@@ -1217,10 +1217,10 @@ class UploadedFileEncodingTest(TestCase):
self.assertEqual(b'Content-Type: text/plain',
encode_file('IGNORE', 'IGNORE', DummyFile("file.txt"))[2])
self.assertIn(encode_file('IGNORE', 'IGNORE', DummyFile("file.zip"))[2], (
- b'Content-Type: application/x-compress',
- b'Content-Type: application/x-zip',
- b'Content-Type: application/x-zip-compressed',
- b'Content-Type: application/zip',))
+ b'Content-Type: application/x-compress',
+ b'Content-Type: application/x-zip',
+ b'Content-Type: application/x-zip-compressed',
+ b'Content-Type: application/zip',))
self.assertEqual(b'Content-Type: application/octet-stream',
encode_file('IGNORE', 'IGNORE', DummyFile("file.unknown"))[2])
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
index 76b9baa3785..79fdcaa9715 100644
--- a/tests/timezones/tests.py
+++ b/tests/timezones/tests.py
@@ -208,51 +208,57 @@ class LegacyDatabaseTests(TestCase):
morning_min_dt = datetime.datetime(2011, 9, 1, 3, 20, 40)
afternoon_min_dt = datetime.datetime(2011, 9, 1, 13, 20, 30)
self.assertQuerysetEqual(
- Session.objects.annotate(dt=Min('events__dt')).order_by('dt'),
- [morning_min_dt, afternoon_min_dt],
- transform=lambda d: d.dt)
+ Session.objects.annotate(dt=Min('events__dt')).order_by('dt'),
+ [morning_min_dt, afternoon_min_dt],
+ transform=lambda d: d.dt)
self.assertQuerysetEqual(
- Session.objects.annotate(dt=Min('events__dt')).filter(dt__lt=afternoon_min_dt),
- [morning_min_dt],
- transform=lambda d: d.dt)
+ Session.objects.annotate(dt=Min('events__dt')).filter(dt__lt=afternoon_min_dt),
+ [morning_min_dt],
+ transform=lambda d: d.dt)
self.assertQuerysetEqual(
- Session.objects.annotate(dt=Min('events__dt')).filter(dt__gte=afternoon_min_dt),
- [afternoon_min_dt],
- transform=lambda d: d.dt)
+ Session.objects.annotate(dt=Min('events__dt')).filter(dt__gte=afternoon_min_dt),
+ [afternoon_min_dt],
+ transform=lambda d: d.dt)
def test_query_datetimes(self):
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 1, 30, 0))
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 4, 30, 0))
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'year'),
- [datetime.datetime(2011, 1, 1, 0, 0, 0)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'month'),
- [datetime.datetime(2011, 1, 1, 0, 0, 0)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'day'),
- [datetime.datetime(2011, 1, 1, 0, 0, 0)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'hour'),
- [datetime.datetime(2011, 1, 1, 1, 0, 0),
- datetime.datetime(2011, 1, 1, 4, 0, 0)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'minute'),
- [datetime.datetime(2011, 1, 1, 1, 30, 0),
- datetime.datetime(2011, 1, 1, 4, 30, 0)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'second'),
- [datetime.datetime(2011, 1, 1, 1, 30, 0),
- datetime.datetime(2011, 1, 1, 4, 30, 0)],
- transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'year'),
+ [datetime.datetime(2011, 1, 1, 0, 0, 0)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'month'),
+ [datetime.datetime(2011, 1, 1, 0, 0, 0)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'day'),
+ [datetime.datetime(2011, 1, 1, 0, 0, 0)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'hour'),
+ [datetime.datetime(2011, 1, 1, 1, 0, 0),
+ datetime.datetime(2011, 1, 1, 4, 0, 0)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'minute'),
+ [datetime.datetime(2011, 1, 1, 1, 30, 0),
+ datetime.datetime(2011, 1, 1, 4, 30, 0)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'second'),
+ [datetime.datetime(2011, 1, 1, 1, 30, 0),
+ datetime.datetime(2011, 1, 1, 4, 30, 0)],
+ transform=lambda d: d)
def test_raw_sql(self):
# Regression test for #17755
dt = datetime.datetime(2011, 9, 1, 13, 20, 30)
event = Event.objects.create(dt=dt)
self.assertQuerysetEqual(
- Event.objects.raw('SELECT * FROM timezones_event WHERE dt = %s', [dt]),
- [event],
- transform=lambda d: d)
+ Event.objects.raw('SELECT * FROM timezones_event WHERE dt = %s', [dt]),
+ [event],
+ transform=lambda d: d)
def test_filter_date_field_with_aware_datetime(self):
# Regression test for #17742
@@ -456,82 +462,94 @@ class NewDatabaseTests(TestCase):
morning_min_dt = datetime.datetime(2011, 9, 1, 3, 20, 40, tzinfo=EAT)
afternoon_min_dt = datetime.datetime(2011, 9, 1, 13, 20, 30, tzinfo=EAT)
self.assertQuerysetEqual(
- Session.objects.annotate(dt=Min('events__dt')).order_by('dt'),
- [morning_min_dt, afternoon_min_dt],
- transform=lambda d: d.dt)
+ Session.objects.annotate(dt=Min('events__dt')).order_by('dt'),
+ [morning_min_dt, afternoon_min_dt],
+ transform=lambda d: d.dt)
self.assertQuerysetEqual(
- Session.objects.annotate(dt=Min('events__dt')).filter(dt__lt=afternoon_min_dt),
- [morning_min_dt],
- transform=lambda d: d.dt)
+ Session.objects.annotate(dt=Min('events__dt')).filter(dt__lt=afternoon_min_dt),
+ [morning_min_dt],
+ transform=lambda d: d.dt)
self.assertQuerysetEqual(
- Session.objects.annotate(dt=Min('events__dt')).filter(dt__gte=afternoon_min_dt),
- [afternoon_min_dt],
- transform=lambda d: d.dt)
+ Session.objects.annotate(dt=Min('events__dt')).filter(dt__gte=afternoon_min_dt),
+ [afternoon_min_dt],
+ transform=lambda d: d.dt)
@skipUnlessDBFeature('has_zoneinfo_database')
def test_query_datetimes(self):
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT))
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT))
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'year'),
- [datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=EAT)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'month'),
- [datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=EAT)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'day'),
- [datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=EAT)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'hour'),
- [datetime.datetime(2011, 1, 1, 1, 0, 0, tzinfo=EAT),
- datetime.datetime(2011, 1, 1, 4, 0, 0, tzinfo=EAT)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'minute'),
- [datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT),
- datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'second'),
- [datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT),
- datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT)],
- transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'year'),
+ [datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=EAT)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'month'),
+ [datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=EAT)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'day'),
+ [datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=EAT)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'hour'),
+ [datetime.datetime(2011, 1, 1, 1, 0, 0, tzinfo=EAT),
+ datetime.datetime(2011, 1, 1, 4, 0, 0, tzinfo=EAT)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'minute'),
+ [datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT),
+ datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'second'),
+ [datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT),
+ datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT)],
+ transform=lambda d: d)
@skipUnlessDBFeature('has_zoneinfo_database')
def test_query_datetimes_in_other_timezone(self):
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT))
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT))
with timezone.override(UTC):
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'year'),
- [datetime.datetime(2010, 1, 1, 0, 0, 0, tzinfo=UTC),
- datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=UTC)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'month'),
- [datetime.datetime(2010, 12, 1, 0, 0, 0, tzinfo=UTC),
- datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=UTC)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'day'),
- [datetime.datetime(2010, 12, 31, 0, 0, 0, tzinfo=UTC),
- datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=UTC)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'hour'),
- [datetime.datetime(2010, 12, 31, 22, 0, 0, tzinfo=UTC),
- datetime.datetime(2011, 1, 1, 1, 0, 0, tzinfo=UTC)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'minute'),
- [datetime.datetime(2010, 12, 31, 22, 30, 0, tzinfo=UTC),
- datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=UTC)],
- transform=lambda d: d)
- self.assertQuerysetEqual(Event.objects.datetimes('dt', 'second'),
- [datetime.datetime(2010, 12, 31, 22, 30, 0, tzinfo=UTC),
- datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=UTC)],
- transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'year'),
+ [datetime.datetime(2010, 1, 1, 0, 0, 0, tzinfo=UTC),
+ datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=UTC)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'month'),
+ [datetime.datetime(2010, 12, 1, 0, 0, 0, tzinfo=UTC),
+ datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=UTC)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'day'),
+ [datetime.datetime(2010, 12, 31, 0, 0, 0, tzinfo=UTC),
+ datetime.datetime(2011, 1, 1, 0, 0, 0, tzinfo=UTC)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'hour'),
+ [datetime.datetime(2010, 12, 31, 22, 0, 0, tzinfo=UTC),
+ datetime.datetime(2011, 1, 1, 1, 0, 0, tzinfo=UTC)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'minute'),
+ [datetime.datetime(2010, 12, 31, 22, 30, 0, tzinfo=UTC),
+ datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=UTC)],
+ transform=lambda d: d)
+ self.assertQuerysetEqual(
+ Event.objects.datetimes('dt', 'second'),
+ [datetime.datetime(2010, 12, 31, 22, 30, 0, tzinfo=UTC),
+ datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=UTC)],
+ transform=lambda d: d)
def test_raw_sql(self):
# Regression test for #17755
dt = datetime.datetime(2011, 9, 1, 13, 20, 30, tzinfo=EAT)
event = Event.objects.create(dt=dt)
self.assertQuerysetEqual(
- Event.objects.raw('SELECT * FROM timezones_event WHERE dt = %s', [dt]),
- [event],
- transform=lambda d: d)
+ Event.objects.raw('SELECT * FROM timezones_event WHERE dt = %s', [dt]),
+ [event],
+ transform=lambda d: d)
@requires_tz_support
def test_filter_date_field_with_aware_datetime(self):
diff --git a/tests/transactions/tests.py b/tests/transactions/tests.py
index a66ffe44ba2..8c0c535d31a 100644
--- a/tests/transactions/tests.py
+++ b/tests/transactions/tests.py
@@ -203,7 +203,7 @@ class AtomicTests(TransactionTestCase):
with self.assertRaises(DatabaseError):
with transaction.atomic(savepoint=False):
connection.cursor().execute(
- "SELECT no_such_col FROM transactions_reporter")
+ "SELECT no_such_col FROM transactions_reporter")
# prevent atomic from rolling back since we're recovering manually
self.assertTrue(transaction.get_rollback())
transaction.set_rollback(False)
diff --git a/tests/utils_tests/test_tzinfo.py b/tests/utils_tests/test_tzinfo.py
index 31fd7c4a500..43522bb1d0b 100644
--- a/tests/utils_tests/test_tzinfo.py
+++ b/tests/utils_tests/test_tzinfo.py
@@ -61,14 +61,14 @@ class TzinfoTests(IgnorePendingDeprecationWarningsMixin, unittest.TestCase):
# US/Eastern -- we force its representation to "EST"
tz = LocalTimezone(dt + datetime.timedelta(days=1))
self.assertEqual(
- repr(datetime.datetime.fromtimestamp(ts - 3600, tz)),
- 'datetime.datetime(2010, 11, 7, 0, 0, tzinfo=EST)')
+ repr(datetime.datetime.fromtimestamp(ts - 3600, tz)),
+ 'datetime.datetime(2010, 11, 7, 0, 0, tzinfo=EST)')
self.assertEqual(
- repr(datetime.datetime.fromtimestamp(ts, tz)),
- 'datetime.datetime(2010, 11, 7, 1, 0, tzinfo=EST)')
+ repr(datetime.datetime.fromtimestamp(ts, tz)),
+ 'datetime.datetime(2010, 11, 7, 1, 0, tzinfo=EST)')
self.assertEqual(
- repr(datetime.datetime.fromtimestamp(ts + 3600, tz)),
- 'datetime.datetime(2010, 11, 7, 1, 0, tzinfo=EST)')
+ repr(datetime.datetime.fromtimestamp(ts + 3600, tz)),
+ 'datetime.datetime(2010, 11, 7, 1, 0, tzinfo=EST)')
def test_copy(self):
now = datetime.datetime.now()