|
4 | 4 | import warnings
|
5 | 5 | from datetime import datetime, timedelta
|
6 | 6 |
|
7 |
| -import django |
| 7 | +from django.apps import apps |
8 | 8 | from django.contrib.auth import get_user_model
|
9 | 9 | from django.core.files.base import ContentFile
|
10 | 10 | from django.db import models
|
11 | 11 | from django.db.models.fields.proxy import OrderWrt
|
12 | 12 | from django.test import TestCase
|
| 13 | + |
13 | 14 | from simple_history.models import HistoricalRecords, convert_auto_field
|
14 | 15 | from simple_history.utils import update_change_reason
|
15 |
| - |
16 | 16 | from ..external.models import ExternalModel2, ExternalModel4
|
17 | 17 | from ..models import (AbstractBase, AdminProfile, Book, Bookcase, Choice, City,
|
18 | 18 | ConcreteAttr, ConcreteExternal, ConcreteUtil, Contact, ContactRegister,
|
@@ -395,6 +395,10 @@ def test_register_app_label(self):
|
395 | 395 | 'external_externalmodel4')
|
396 | 396 | self.assertEqual(self.get_table_name(ExternalModel4.histories),
|
397 | 397 | 'tests_historicalexternalmodel4')
|
| 398 | + self.assertEqual(self.get_table_name(ConcreteExternal.objects), |
| 399 | + 'tests_concreteexternal') |
| 400 | + self.assertEqual(self.get_table_name(ConcreteExternal.history), |
| 401 | + 'tests_historicalconcreteexternal') |
398 | 402 |
|
399 | 403 | def test_get_model(self):
|
400 | 404 | self.assertEqual(get_model('external', 'ExternalModel1'),
|
|
0 commit comments