1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/source4/selftest
Rob van der Linde 3a579eab8b netcmd: domain: model field tests
Add tests for model fields to ensure they behave as expected when
calling from_db_value and to_db_value methods.

Add a base class for the tests themselves via a mixin as unittest
doesn't support abstract test case classes.

For each field, from_db_value and to_db_value must either be a list or
a property that returns a list.

The list contains input values and expected values, the expected value
can also be a callback for more complex comparison, this is used for
the possible claim values xml.

It is important that singular values and list values are tested, and
also None to ensure that fields properly get unset when a model is
saved.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2023-06-25 23:29:32 +00:00
..
provisions s4:selftest: Reformat shell scripts 2022-07-15 12:08:36 +00:00
win s4:selftest: Fix shellcheck errors in wintest_rpc.sh 2022-08-22 20:35:36 +00:00
test_samba3dump.sh s4:selftest: Reformat shell scripts 2022-07-15 12:08:36 +00:00
test_w2k3_file.sh s4:selftest: Reformat shell scripts 2022-07-15 12:08:36 +00:00
test_w2k3.sh s4:selftest: Fix shellcheck errors in test_w2k3.sh 2022-08-22 14:20:36 +00:00
test_win.sh s4:selftest: Reformat shell scripts 2022-07-15 12:08:36 +00:00
tests_win2k3_dc.sh
tests_win.sh s4:selftest: Reformat shell scripts 2022-07-15 12:08:36 +00:00
tests.py netcmd: domain: model field tests 2023-06-25 23:29:32 +00:00