magic-removal: Removed module_name calls in model unit tests

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-12-14 04:25:46 +00:00
parent e8db0b01d2
commit 464b638d90
3 changed files with 1 additions and 13 deletions

View File

@ -15,7 +15,6 @@ from django.core import meta
class Category(meta.Model):
name = meta.CharField(maxlength=20)
class META:
module_name = 'categories'
ordering = ('name',)
def __repr__(self):

View File

@ -15,8 +15,6 @@ from django.core import meta
class Category(meta.Model):
name = meta.CharField(maxlength=20)
parent = meta.ForeignKey('self', null=True, related_name='child')
class META:
module_name = 'categories'
def __repr__(self):
return self.name

View File

@ -20,23 +20,18 @@ from modeltests.ordering.models import Article as ArticleWithOrdering
# adds a "section" field.
class ArticleWithSection(Article):
section = meta.CharField(maxlength=30)
class META:
module_name = 'subarticles1'
# This uses all fields and metadata from Article but
# removes the "pub_date" field.
class ArticleWithoutPubDate(Article):
class META:
module_name = 'subarticles2'
remove_fields = ('pub_date',)
# This uses all fields and metadata from Article but
# overrides the "pub_date" field.
class ArticleWithFieldOverride(Article):
pub_date = meta.DateField() # overrides the old field, a DateTimeField
class META:
module_name = 'subarticles3'
# No need to add remove_fields = ('pub_date',)
# No need to add remove_fields = ('pub_date',)
# This uses all fields and metadata from ArticleWithRepr and
# makes a few additions/changes.
@ -44,17 +39,13 @@ class ArticleWithManyChanges(ArticleWithRepr):
section = meta.CharField(maxlength=30)
is_popular = meta.BooleanField()
pub_date = meta.DateField() # overrides the old field, a DateTimeField
class META:
module_name = 'subarticles4'
# This uses all fields from ArticleWithOrdering but
# changes the ordering parameter.
class ArticleWithChangedMeta(ArticleWithOrdering):
class META:
module_name = 'subarticles5'
ordering = ('headline', 'pub_date')
# These two models don't define a module_name.
class NoModuleNameFirst(Article):
section = meta.CharField(maxlength=30)