mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate.
This commit is contained in:
committed by
Mariusz Felisiak
parent
acde917456
commit
1024b5e74a
@@ -18,7 +18,7 @@ class ManyToManyTests(TestCase):
|
||||
cls.p3 = Publication.objects.create(title='Science Weekly')
|
||||
cls.p4 = Publication.objects.create(title='Highlights for Children')
|
||||
|
||||
cls.a1 = Article.objects.create(headline='Django lets you build Web apps easily')
|
||||
cls.a1 = Article.objects.create(headline='Django lets you build web apps easily')
|
||||
cls.a1.publications.add(cls.p1)
|
||||
|
||||
cls.a2 = Article.objects.create(headline='NASA uses Python')
|
||||
@@ -32,10 +32,10 @@ class ManyToManyTests(TestCase):
|
||||
|
||||
def test_add(self):
|
||||
# Create an Article.
|
||||
a5 = Article(headline='Django lets you create Web apps easily')
|
||||
a5 = Article(headline='Django lets you create web apps easily')
|
||||
# You can't associate it with a Publication until it's been saved.
|
||||
msg = (
|
||||
'"<Article: Django lets you create Web apps easily>" needs to have '
|
||||
'"<Article: Django lets you create web apps easily>" needs to have '
|
||||
'a value for field "id" before this many-to-many relationship can be used.'
|
||||
)
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
@@ -58,7 +58,7 @@ class ManyToManyTests(TestCase):
|
||||
)
|
||||
|
||||
# Adding an object of the wrong type raises TypeError
|
||||
msg = "'Publication' instance expected, got <Article: Django lets you create Web apps easily>"
|
||||
msg = "'Publication' instance expected, got <Article: Django lets you create web apps easily>"
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
with transaction.atomic():
|
||||
a6.publications.add(a5)
|
||||
@@ -71,7 +71,7 @@ class ManyToManyTests(TestCase):
|
||||
)
|
||||
|
||||
def test_add_remove_set_by_pk(self):
|
||||
a5 = Article.objects.create(headline='Django lets you create Web apps easily')
|
||||
a5 = Article.objects.create(headline='Django lets you create web apps easily')
|
||||
a5.publications.add(self.p1.pk)
|
||||
self.assertSequenceEqual(a5.publications.all(), [self.p1])
|
||||
a5.publications.set([self.p2.pk])
|
||||
@@ -82,7 +82,7 @@ class ManyToManyTests(TestCase):
|
||||
def test_add_remove_set_by_to_field(self):
|
||||
user_1 = User.objects.create(username='Jean')
|
||||
user_2 = User.objects.create(username='Joe')
|
||||
a5 = Article.objects.create(headline='Django lets you create Web apps easily')
|
||||
a5 = Article.objects.create(headline='Django lets you create web apps easily')
|
||||
a5.authors.add(user_1.username)
|
||||
self.assertSequenceEqual(a5.authors.all(), [user_1])
|
||||
a5.authors.set([user_2.username])
|
||||
@@ -419,7 +419,7 @@ class ManyToManyTests(TestCase):
|
||||
# (#19816).
|
||||
self.p1.article_set.set([self.a1, self.a2])
|
||||
|
||||
qs = self.p1.article_set.filter(headline='Django lets you build Web apps easily')
|
||||
qs = self.p1.article_set.filter(headline='Django lets you build web apps easily')
|
||||
self.p1.article_set.set(qs)
|
||||
|
||||
self.assertEqual(1, self.p1.article_set.count())
|
||||
|
||||
Reference in New Issue
Block a user