diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-09-27 15:37:19 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-09-27 15:37:19 +0000 |
| commit | 025ee2c13e9e3c386c746c03ba7cd7603b4b7d10 (patch) | |
| tree | 3c431e9bfe2ef8eb6416cd199827de30fdb0d508 /tests/regressiontests/string_lookup/models.py | |
| parent | 74b6c76e25404d9ca5c8a8d76a29597582adec4d (diff) | |
[1.2.X] Migrated string_lookup doctests. Thanks to Stephan Jaekel.
Backport of r13895 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/string_lookup/models.py')
| -rw-r--r-- | tests/regressiontests/string_lookup/models.py | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/regressiontests/string_lookup/models.py b/tests/regressiontests/string_lookup/models.py index 1bdb2d4452..037854dadd 100644 --- a/tests/regressiontests/string_lookup/models.py +++ b/tests/regressiontests/string_lookup/models.py @@ -43,67 +43,3 @@ class Article(models.Model): def __str__(self): return "Article %s" % self.name - -__test__ = {'API_TESTS': ur""" -# Regression test for #1661 and #1662: Check that string form referencing of -# models works, both as pre and post reference, on all RelatedField types. - ->>> f1 = Foo(name="Foo1") ->>> f1.save() ->>> f2 = Foo(name="Foo2") ->>> f2.save() - ->>> w1 = Whiz(name="Whiz1") ->>> w1.save() - ->>> b1 = Bar(name="Bar1", normal=f1, fwd=w1, back=f2) ->>> b1.save() - ->>> b1.normal -<Foo: Foo Foo1> - ->>> b1.fwd -<Whiz: Whiz Whiz1> - ->>> b1.back -<Foo: Foo Foo2> - ->>> base1 = Base(name="Base1") ->>> base1.save() - ->>> child1 = Child(name="Child1", parent=base1) ->>> child1.save() - ->>> child1.parent -<Base: Base Base1> - -# Regression tests for #3937: make sure we can use unicode characters in -# queries. -# BUG: These tests fail on MySQL, but it's a problem with the test setup. A -# properly configured UTF-8 database can handle this. - ->>> fx = Foo(name='Bjorn', friend=u'François') ->>> fx.save() ->>> Foo.objects.get(friend__contains=u'\xe7') -<Foo: Foo Bjorn> - -# We can also do the above query using UTF-8 strings. ->>> Foo.objects.get(friend__contains='\xc3\xa7') -<Foo: Foo Bjorn> - -# Regression tests for #5087: make sure we can perform queries on TextFields. ->>> a = Article(name='Test', text='The quick brown fox jumps over the lazy dog.') ->>> a.save() ->>> Article.objects.get(text__exact='The quick brown fox jumps over the lazy dog.') -<Article: Article Test> - ->>> Article.objects.get(text__contains='quick brown fox') -<Article: Article Test> - -# Regression test for #708: "like" queries on IP address fields require casting -# to text (on PostgreSQL). ->>> Article(name='IP test', text='The body', submitted_from='192.0.2.100').save() ->>> Article.objects.filter(submitted_from__contains='192.0.2') -[<Article: Article IP test>] - -"""} |
