@@ -154,8 +154,7 @@ def test_history_form_permission(self):
154
154
def test_invalid_history_form (self ):
155
155
self .login ()
156
156
poll = Poll .objects .create (question = "why?" , pub_date = today )
157
- with patch ("simple_history.admin.SIMPLE_HISTORY_EDIT" , True ):
158
- response = self .client .post (get_history_url (poll , 0 ), data = {"question" : "" })
157
+ response = self .client .post (get_history_url (poll , 0 ), data = {"question" : "" })
159
158
self .assertEqual (response .status_code , 200 )
160
159
self .assertContains (response , "This field is required" )
161
160
@@ -201,25 +200,6 @@ def test_history_form(self):
201
200
[p .history_user for p in Poll .history .all ()], [self .user , None , None ]
202
201
)
203
202
204
- def test_readonly_history_form_without_setting_simple_history_edit (self ):
205
- self .login ()
206
- poll = Poll .objects .create (question = "why?" , pub_date = today )
207
- poll .question = "how?"
208
- poll .save ()
209
- response = self .client .get (get_history_url (poll , 0 ))
210
- readonly_fields = response .context ["adminform" ].readonly_fields
211
- self .assertCountEqual (["question" , "pub_date" ], readonly_fields )
212
-
213
- def test_readonly_history_form_with_enabled_simple_history_edit (self ):
214
- self .login ()
215
- poll = Poll .objects .create (question = "why?" , pub_date = today )
216
- poll .question = "how?"
217
- poll .save ()
218
- with patch ("simple_history.admin.SIMPLE_HISTORY_EDIT" , True ):
219
- response = self .client .get (get_history_url (poll , 0 ))
220
- readonly_fields = response .context ["adminform" ].readonly_fields
221
- self .assertEqual (0 , len (readonly_fields ))
222
-
223
203
def test_history_user_on_save_in_admin (self ):
224
204
self .login ()
225
205
0 commit comments