mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
3a579eab8b
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> |
||
---|---|---|
.. | ||
examples | ||
samba | ||
modules.c | ||
modules.h | ||
py3compat.h | ||
pyglue.c | ||
wscript |