12 | | # NOTE: The format of the included SQL file for this test suite is important. |
| 13 | def __unicode__(self): |
| 14 | return self.name |
| 15 | |
| 16 | |
| 17 | __test__ = {'API_TESTS':""" |
| 18 | # Syncdb introduces these records from custom SQL. |
| 19 | >>> from django.conf import settings |
| 20 | >>> from django.core import management |
| 21 | >>> from django.db.models import get_app |
| 22 | |
| 23 | # Error only occurs when adding the SQL query to the debug output |
| 24 | # so need to be in debug mode |
| 25 | >>> _debug_setting_old = settings.DEBUG |
| 26 | >>> settings.DEBUG = True |
| 27 | |
| 28 | # Reset the database representation of this app in a way that will |
| 29 | # trigger initial SQL loading while in DEBUG mode |
| 30 | >>> management.reset(get_app('initial_sql_regress'), interactive=False) |
| 31 | |
| 32 | >>> Simple2.objects.all() |
| 33 | [<Simple2: John & Kathy>, <Simple2: Miles O'Brien>, <Simple2: "100%" of % are not placeholders>] |
| 34 | |
| 35 | # Restore DEBUG setting |
| 36 | >>> settings.DEBUG = _debug_setting_old |
| 37 | """} |
| 38 | |
| 39 | |
| 40 | # NOTE: The format of simple.sql file for this test suite is important. |