tests: Rework backup test_backup_invalid_args test-case
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 22 Nov 2018 01:35:58 +0000 (14:35 +1300)
committerTim Beale <timbeale@samba.org>
Tue, 27 Nov 2018 02:43:17 +0000 (03:43 +0100)
commit93c2a9522357e7d70d028cbd6bbeda103f40c69e
tree75e376ef5e3833ba26d5fd08cd00341b38fb4e24
parent160031f7b7e4e14a1b9ff9316b166fd52b7d401d
tests: Rework backup test_backup_invalid_args test-case

self.create_backup() uses self.run_cmd(), which is a wrapper around
self.check_output(). Rework the code to call the underlying
check_output() function directly instead.

The reason we're doing this is we want run_cmd() to catch exceptions and
fail the test (i.e. in the next patch). However, we can't do that because
this test case relies on receiving the exceptions.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/domain_backup.py