<s> from __future__ import absolute_import <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> from django . db . models . loading import get_app <EOL> from django . test import TestCase <EOL> from django . test . utils import override_settings <EOL> from django . utils import six <EOL> from . models import Empty <EOL> class EmptyModelTests ( TestCase ) : <EOL> def test_empty ( self ) : <EOL> m = Empty ( ) <EOL> self . assertEqual ( m . id , None ) <EOL> m . save ( ) <EOL> Empty . objects . create ( ) <EOL> self . assertEqual ( len ( Empty . objects . all ( ) ) , <NUM_LIT:2> ) <EOL> self . assertTrue ( m . id is not None ) <EOL> existing = Empty ( m . id ) <EOL> existing . save ( ) <EOL> class NoModelTests ( TestCase ) : <EOL> """<STR_LIT>""" <EOL> @ override_settings ( INSTALLED_APPS = ( "<STR_LIT>" , ) ) <EOL> def test_no_models ( self ) : <EOL> with six . assertRaisesRegex ( self , ImproperlyConfigured , <EOL> '<STR_LIT>' ) : <EOL> get_app ( '<STR_LIT>' ) </s>
