Ejemplo n.º 1
0
 def test_update_form_kwargs_contain_prefix(self):
     updateview = EconsensusActionitemUpdateView()
     updateview.object = ActionItem(id=1)
     updateview.request = RequestFactory().get('/')
     updateview.kwargs = {'decisionpk': 1}
     form_kwargs = updateview.get_form_kwargs()
     assert 'prefix' in form_kwargs
     assert form_kwargs['prefix'] == "actionitem-1"
 def test_update_get_successurl(self):
     updateview = EconsensusActionitemUpdateView()
     updateview.object = ActionItem(id=1)
     updateview.kwargs = {'decisionpk': 1}
     assert updateview.get_success_url() == reverse('actionitem_detail',
                                                    kwargs={
                                                        'decisionpk': 1,
                                                        'pk': 1
                                                    })
Ejemplo n.º 3
0
 def test_update_get_successurl(self):
     updateview = EconsensusActionitemUpdateView()
     updateview.object = ActionItem(id=1)
     updateview.kwargs = {'decisionpk': 1}
     assert updateview.get_success_url() == reverse('actionitem_detail', kwargs={'decisionpk': 1, 'pk': 1})