def test_validate_create(self, validate_template, validate_model): user = Mock(User) validator.validate_create(user) validate_model.assert_called_once_with(user) validate_template.assert_called_once_with(user)
def create(user): validator.validate_create(user) user = _create_user_in_database(user) notifier.created(user) return user