def test_delete_subscription_wrong_name(controller: Controller, name): """Test that Controller will not delete subscription with subscription name type""" with pytest.raises(SubscriptionException) as exc: assert controller.delete_subscription(name) assert str(exc.value) == WRONG_TYPE_MSG.format(expected=str, recieved_type=type(name), field=name)
def test_delete_subscription_empty_name(controller: Controller): """Test that Controller will not delete subscription with subscription name value""" with pytest.raises(SubscriptionException) as exc: assert controller.delete_subscription("") assert str(exc.value) == EMPTY_FIELD_MSG
def test_delete_subscription(controller: Controller): """Test existing subscription deletion""" assert controller.delete_subscription("Youtube Music") == 1