MCPcopy
hub / github.com/django/django / test_inheritance_new_table

Method test_inheritance_new_table

tests/proxy_models/tests.py:55–64  ·  view source on GitHub ↗

The StatusPerson models should have its own table (it's using ORM-level inheritance).

(self)

Source from the content-addressed store, hash-verified

53 self.assertEqual(my_person_sql, person_sql)
54
55 def test_inheritance_new_table(self):
56 """
57 The StatusPerson models should have its own table (it's using ORM-level
58 inheritance).
59 """
60 sp_sql = (
61 StatusPerson.objects.all().query.get_compiler(DEFAULT_DB_ALIAS).as_sql()
62 )
63 p_sql = Person.objects.all().query.get_compiler(DEFAULT_DB_ALIAS).as_sql()
64 self.assertNotEqual(sp_sql, p_sql)
65
66 def test_basic_proxy(self):
67 """

Callers

nothing calls this directly

Calls 3

get_compilerMethod · 0.80
as_sqlMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected