MCPcopy
hub / github.com/django/django / setUp

Method setUp

tests/admin_ordering/tests.py:140–147  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

138 cls.b2 = Band.objects.create(name="Foo Fighters", bio="", rank=5)
139
140 def setUp(self):
141 # we need to register a custom ModelAdmin (instead of just using
142 # ModelAdmin) because the field creator tries to find the ModelAdmin
143 # for the related model
144 class SongAdmin(admin.ModelAdmin):
145 pass
146
147 site.register(Song, SongAdmin)
148
149 def tearDown(self):
150 site.unregister(Song)

Callers

nothing calls this directly

Calls 1

registerMethod · 0.45

Tested by

no test coverage detected