예제 #1
0
    def test_delete_deletes_group(self, group, delete_group_svc, pyramid_request, routes):
        pyramid_request.matchdict = {"pubid": group.pubid}

        ctrl = GroupEditController(pyramid_request)

        ctrl.delete()

        delete_group_svc.delete.assert_called_once_with(group)
예제 #2
0
    def test_delete_deletes_group(self, group, group_svc, delete_group_svc,
                                  pyramid_request, routes):
        group_svc.fetch.return_value = group

        ctrl = GroupEditController(pyramid_request)

        ctrl.delete()

        delete_group_svc.delete.assert_called_once_with(group)