Commit d5a45d79 authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Convert all modeltests to use absolute imports, rather than relative ones.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 99512d35
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
from __future__ import absolute_import

import datetime
from decimal import Decimal

from django.db.models import Avg, Sum, Count, Max, Min
from django.test import TestCase, Approximate

from models import Author, Publisher, Book, Store
from .models import Author, Publisher, Book, Store


class BaseAggregateTestCase(TestCase):
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ This is a basic model with only two non-primary-key fields.
"""
from django.db import models


class Article(models.Model):
    headline = models.CharField(max_length=100, default='Default headline')
    pub_date = models.DateTimeField()
+3 −1
Original line number Diff line number Diff line
from __future__ import absolute_import

from datetime import datetime

from django.core.exceptions import ObjectDoesNotExist
from django.db.models.fields import FieldDoesNotExist
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature

from models import Article
from .models import Article


class ModelTest(TestCase):
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ field. This method returns the "human-readable" value of the field.

from django.db import models


GENDER_CHOICES = (
    ('M', 'Male'),
    ('F', 'Female'),
+5 −3
Original line number Diff line number Diff line
from __future__ import absolute_import

from django.test import TestCase

from models import Person
from .models import Person


class ChoicesTests(TestCase):
Loading