@@ -14,6 +14,19 @@ class BaseDjangoObjectActionsTest(TestCase):
14
14
def setUp (self ):
15
15
self .instance = BaseDjangoObjectActions ()
16
16
17
+ def test_get_object_actions_gets_attribute (self ):
18
+ mock_objectactions = [] # set to something mutable
19
+ mock_request = 'request'
20
+ mock_context = 'context'
21
+ mock_kwargs = {}
22
+ self .instance .objectactions = mock_objectactions
23
+ returned_value = self .instance .get_object_actions (
24
+ mock_request , mock_context , ** mock_kwargs
25
+ )
26
+ # assert that `mock_objectactions` was returned
27
+ self .assertEqual (id (mock_objectactions ), id (returned_value ))
28
+ # WISHLIST assert get_object_actions was called with right args
29
+
17
30
def test_get_djoa_button_attrs_returns_defaults (self ):
18
31
mock_tool = type ('mock_tool' , (object , ), {})
19
32
attrs , __ = self .instance .get_djoa_button_attrs (mock_tool )
@@ -35,7 +48,6 @@ def test_get_djoa_button_attrs_disallows_title(self):
35
48
attrs , __ = self .instance .get_djoa_button_attrs (mock_tool )
36
49
self .assertEqual (attrs ['title' ], 'real title' )
37
50
38
-
39
51
def test_get_djoa_button_attrs_gets_set (self ):
40
52
mock_tool = type ('mock_tool' , (object , ), {
41
53
'attrs' : {'class' : 'class' },
0 commit comments