diff options
| author | Adam Johnson <me@adamj.eu> | 2020-05-01 13:37:21 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-04 12:10:47 +0200 |
| commit | d17b380653da5f95885ce53468fe7aac60672841 (patch) | |
| tree | 9fbe962d480093a45cf238d22596812637765c74 /tests | |
| parent | 787981f9d1d5abc489a0b069e3353b8ad7aa9778 (diff) | |
Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/custom_pk/tests.py | 4 | ||||
| -rw-r--r-- | tests/select_related/tests.py | 9 | ||||
| -rw-r--r-- | tests/timezones/tests.py | 4 | ||||
| -rw-r--r-- | tests/utils_tests/test_safestring.py | 4 |
4 files changed, 7 insertions, 14 deletions
diff --git a/tests/custom_pk/tests.py b/tests/custom_pk/tests.py index 934ed248ea..abb4ccd90b 100644 --- a/tests/custom_pk/tests.py +++ b/tests/custom_pk/tests.py @@ -191,8 +191,8 @@ class CustomPKTests(TestCase): Business.objects.create(name='jaźń') def test_unique_pk(self): - # The primary key must also obviously be unique, so trying to create a - # new object with the same primary key will fail. + # The primary key must also be unique, so trying to create a new object + # with the same primary key will fail. Employee.objects.create( employee_code=123, first_name="Frank", last_name="Jones" ) diff --git a/tests/select_related/tests.py b/tests/select_related/tests.py index 0af10f207f..6debf0d67b 100644 --- a/tests/select_related/tests.py +++ b/tests/select_related/tests.py @@ -60,10 +60,6 @@ class SelectRelatedTests(TestCase): self.assertEqual(domain.name, 'Eukaryota') def test_list_without_select_related(self): - """ - select_related() also of course applies to entire lists, not just - items. This test verifies the expected behavior without select_related. - """ with self.assertNumQueries(9): world = Species.objects.all() families = [o.genus.family.name for o in world] @@ -75,10 +71,7 @@ class SelectRelatedTests(TestCase): ]) def test_list_with_select_related(self): - """ - select_related() also of course applies to entire lists, not just - items. This test verifies the expected behavior with select_related. - """ + """select_related() applies to entire lists, not just items.""" with self.assertNumQueries(1): world = Species.objects.all().select_related() families = [o.genus.family.name for o in world] diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py index a211a43de0..8756f87716 100644 --- a/tests/timezones/tests.py +++ b/tests/timezones/tests.py @@ -1060,14 +1060,14 @@ class LegacyFormsTests(TestCase): def test_form_with_non_existent_time(self): form = EventForm({'dt': '2011-03-27 02:30:00'}) with timezone.override(pytz.timezone('Europe/Paris')): - # this is obviously a bug + # This is a bug. self.assertTrue(form.is_valid()) self.assertEqual(form.cleaned_data['dt'], datetime.datetime(2011, 3, 27, 2, 30, 0)) def test_form_with_ambiguous_time(self): form = EventForm({'dt': '2011-10-30 02:30:00'}) with timezone.override(pytz.timezone('Europe/Paris')): - # this is obviously a bug + # This is a bug. self.assertTrue(form.is_valid()) self.assertEqual(form.cleaned_data['dt'], datetime.datetime(2011, 10, 30, 2, 30, 0)) diff --git a/tests/utils_tests/test_safestring.py b/tests/utils_tests/test_safestring.py index 4068896020..2eeddb0571 100644 --- a/tests/utils_tests/test_safestring.py +++ b/tests/utils_tests/test_safestring.py @@ -7,8 +7,8 @@ from django.utils.safestring import SafeData, mark_safe class customescape(str): def __html__(self): - # implement specific and obviously wrong escaping - # in order to be able to tell for sure when it runs + # Implement specific and wrong escaping in order to be able to detect + # when it runs. return self.replace('<', '<<').replace('>', '>>') |
