def test_delete_single_failure(): view = TestDataDetailRestView() view.object = Mock() view.object.delete.side_effect = Exception result = view.delete(None) view.object.delete.assert_called_once_with() assert_equal(result, False)
def test_delete_single(): view = TestDataDetailRestView() view.object = Mock() result = view.delete(None) view.object.delete.assert_called_once_with() assert_equal(result, True)