mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
frontend: report arguments errors with better detail
When reporting argument errors, show also a context -- what is processed, what is the name of the command.
This commit is contained in:
committed by
Martin Kosek
parent
0b29bfde0d
commit
2d6c7e3adb
@@ -280,7 +280,7 @@ class test_Command(ClassChecker):
|
||||
|
||||
# Test ValueError, required after optional:
|
||||
e = raises(ValueError, self.get_instance, args=('arg1?', 'arg2'))
|
||||
assert str(e) == 'arg2: required argument after optional'
|
||||
assert str(e) == "arg2: required argument after optional in %s arguments ['arg1?', 'arg2']" % (self.get_instance().name)
|
||||
|
||||
# Test ValueError, scalar after multivalue:
|
||||
e = raises(ValueError, self.get_instance, args=('arg1+', 'arg2'))
|
||||
|
||||
Reference in New Issue
Block a user