diff options
author | Arthur Koziel <arthur@arthurkoziel.com> | 2010-09-13 00:04:27 +0000 |
---|---|---|
committer | Arthur Koziel <arthur@arthurkoziel.com> | 2010-09-13 00:04:27 +0000 |
commit | dd49269c7db008b2567f50cb03c4d3d9b321daa1 (patch) | |
tree | 326dd25bb045ac016cda7966b43cbdfe1f67d699 /tests/modeltests/m2m_multiple/models.py | |
parent | c9b188c4ec939abbe48dae5a371276742e64b6b8 (diff) | |
download | django-soc2010/app-loading.tar.gz |
[soc2010/app-loading] merged trunkarchive/soc2010/app-loadingsoc2010/app-loading
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/m2m_multiple/models.py')
-rw-r--r-- | tests/modeltests/m2m_multiple/models.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/tests/modeltests/m2m_multiple/models.py b/tests/modeltests/m2m_multiple/models.py index 42e74553d9..e53f840653 100644 --- a/tests/modeltests/m2m_multiple/models.py +++ b/tests/modeltests/m2m_multiple/models.py @@ -28,52 +28,3 @@ class Article(models.Model): def __unicode__(self): return self.headline -__test__ = {'API_TESTS':""" ->>> from datetime import datetime - ->>> c1 = Category(name='Sports') ->>> c1.save() ->>> c2 = Category(name='News') ->>> c2.save() ->>> c3 = Category(name='Crime') ->>> c3.save() ->>> c4 = Category(name='Life') ->>> c4.save() - ->>> a1 = Article(headline='Area man steals', pub_date=datetime(2005, 11, 27)) ->>> a1.save() ->>> a1.primary_categories.add(c2, c3) ->>> a1.secondary_categories.add(c4) - ->>> a2 = Article(headline='Area man runs', pub_date=datetime(2005, 11, 28)) ->>> a2.save() ->>> a2.primary_categories.add(c1, c2) ->>> a2.secondary_categories.add(c4) - ->>> a1.primary_categories.all() -[<Category: Crime>, <Category: News>] - ->>> a2.primary_categories.all() -[<Category: News>, <Category: Sports>] - ->>> a1.secondary_categories.all() -[<Category: Life>] - - ->>> c1.primary_article_set.all() -[<Article: Area man runs>] ->>> c1.secondary_article_set.all() -[] ->>> c2.primary_article_set.all() -[<Article: Area man steals>, <Article: Area man runs>] ->>> c2.secondary_article_set.all() -[] ->>> c3.primary_article_set.all() -[<Article: Area man steals>] ->>> c3.secondary_article_set.all() -[] ->>> c4.primary_article_set.all() -[] ->>> c4.secondary_article_set.all() -[<Article: Area man steals>, <Article: Area man runs>] -"""} |