Ticket #10573: tests.diff
File tests.diff, 1.7 KB (added by , 16 years ago) |
---|
-
tests/regressiontests/admin_views/tests.py
199 199 response = self.client.get('/test_admin/%s/my_view/' % self.urlbit) 200 200 self.assert_(response.content == "Django is a magical pony!", response.content) 201 201 202 class JavaScriptAdminTest(AdminViewBasicTest): 203 204 def testAdminSplitDateTimeFocus(self): 205 request = self.client.get('/test_admin/%s/admin_views/reservation/add/' % self.urlbit) 206 self.failUnless( 207 '<script type="text/javascript">document.getElementById("id_start_date_0").focus();</script>' in request.content, 208 "Date field did not correctly receive focus." 209 ) 210 202 211 def get_perm(Model, perm): 203 212 """Return the permission object, for the Model""" 204 213 ct = ContentType.objects.get_for_model(Model) -
tests/regressiontests/admin_views/models.py
199 199 BarAccountAdmin 200 200 ) 201 201 202 class Reservation(models.Model): 203 start_date = models.DateTimeField() 202 204 203 205 admin.site.register(Article, ArticleAdmin) 204 206 admin.site.register(CustomArticle, CustomArticleAdmin) … … 208 210 admin.site.register(Thing, ThingAdmin) 209 211 admin.site.register(Person, PersonAdmin) 210 212 admin.site.register(Persona, PersonaAdmin) 213 admin.site.register(Reservation) 211 214 212 215 # We intentionally register Promo and ChapterXtra1 but not Chapter nor ChapterXtra2. 213 216 # That way we cover all four cases: