def test_bad_max_length(self): Validations.validate_max_length('foo', '1234567890', 5)
def test_bad_min_length(self): Validations.validate_min_length('foo', '12345', 10)
def test_good_max_length(self): result = Validations.validate_max_length('foo', '1234567890', 10) assert result is True
def test_bad_at_least_one_argument_is_set(self): with raises(AzureInvalidCommand): result = Validations.validate_at_least_one_argument_is_set( self.command_args, ['--arg-3', '--arg-4'])
def test_none_at_least_one_argument_is_set(self): with raises(AzureInvalidCommand): result = Validations.validate_at_least_one_argument_is_set( self.command_args)
def test_bad_max_length(self): with raises(AzureInvalidCommand): Validations.validate_max_length('foo', '1234567890', 5)
def test_good_at_least_one_argument_is_set(self): result = Validations.validate_at_least_one_argument_is_set( self.command_args, ['--arg-1', '--arg-2']) assert result is True
def test_bad_min_length(self): with raises(AzureInvalidCommand): Validations.validate_min_length('foo', '12345', 10)
def validate_at_least_one_argument_is_set(self, keys): return Validations.validate_at_least_one_argument_is_set( self.command_args, keys)
def validate_date(self, cmd_arg): return Validations.validate_date(cmd_arg, self.command_args[cmd_arg])
def validate_sas_permissions(self, cmd_arg): return Validations.validate_sas_permissions(cmd_arg, self.command_args[cmd_arg])
def validate_max_length(self, cmd_arg, max_length): return Validations.validate_max_length(cmd_arg, self.command_args[cmd_arg], max_length)