Changeset 6353
- Timestamp:
- 09/16/07 05:04:03 (1 year ago)
- Files:
-
- django/trunk/tests/modeltests/fixtures/models.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/modeltests/fixtures/models.py
r6264 r6353 10 10 11 11 from django.db import models 12 from django.conf import settings 12 13 13 14 class Article(models.Model): … … 54 55 >>> Article.objects.all() 55 56 [<Article: XML identified as leading cause of cancer>, <Article: Django conquers world!>, <Article: Copyright is fine the way it is>, <Article: Poker on TV is great!>, <Article: Python program becomes self aware>] 57 """} 56 58 59 # Database flushing does not work on MySQL with the default storage engine, 60 # because it requires transaction spuport. 61 if settings.DATABASE_ENGINE not in ('mysql', 'mysql_old'): 62 __test__['API_TESTS'] += \ 63 """ 57 64 # Reset the database representation of this app. This will delete all data. 58 65 >>> management.call_command('flush', verbosity=0, interactive=False) … … 76 83 >>> management.call_command('dumpdata', 'fixtures', format='json') 77 84 [{"pk": 3, "model": "fixtures.article", "fields": {"headline": "Time to reform copyright", "pub_date": "2006-06-16 13:00:00"}}, {"pk": 2, "model": "fixtures.article", "fields": {"headline": "Poker has no place on ESPN", "pub_date": "2006-06-16 12:00:00"}}, {"pk": 1, "model": "fixtures.article", "fields": {"headline": "Python program becomes self aware", "pub_date": "2006-06-16 11:00:00"}}] 78 """ }85 """ 79 86 80 87 from django.test import TestCase
