Skip to content

Commit

Permalink
Use the right modeladmin fixture on tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lefterisnik committed Jun 10, 2017
1 parent b155bb6 commit a71ac70
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _obj_simple(self, obj_params):
request_user=RequestUser('user_with_v_perm_on_model1', 'add'),
obj_func=None,
obj_params={},
modeladmin_func=_modeladmin_with_property_on_fields,
modeladmin_func=_modeladmin_with_tuple_as_fields,
result={
'get_readonly_fields': ('var1', 'var2', 'var3', 'var4', 'var5',
'var6'),
Expand Down Expand Up @@ -531,6 +531,24 @@ def _obj_simple(self, obj_params):
},
}
),
GeneralParams(
name='change_from_a_simple_user_with_view_permission_and_tuple_as'
'fields',
request_user=RequestUser('user_with_v_perm_on_model1', 'change'),
obj_func=_obj_simple,
obj_params={},
modeladmin_func=_modeladmin_with_tuple_as_fields,
result={
'get_readonly_fields': ('var1', 'var2', 'var3', 'var4', 'var5',
'var6'),
'get_fields': ['var1', 'var2', 'var3', 'var4', 'var5', 'var6'],
'has_view_permission': True,
'has_change_permission': {
'default': True,
'change_only': False,
},
}
),
GeneralParams(
name='change_from_a_simple_user_with_view_permission_and_func_on'
'_fields',
Expand Down

0 comments on commit a71ac70

Please sign in to comment.