From: Joseph Sutton Date: Thu, 25 May 2023 22:10:02 +0000 (+1200) Subject: selftest: Assert trust realm is not None X-Git-Tag: talloc-2.4.1~401 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49592b80f751e3ff19b5b86ae0a7841fabfb8cf1;p=thirdparty%2Fsamba.git selftest: Assert trust realm is not None This is consistent with the other tests in this file. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/getdcname.py b/python/samba/tests/getdcname.py index f6c4ea2e88c..6dbe7aba454 100644 --- a/python/samba/tests/getdcname.py +++ b/python/samba/tests/getdcname.py @@ -155,8 +155,7 @@ class GetDCNameEx(samba.tests.TestCase): We assume that there is a Default-First-Site-Name site. """ - if self.trust_realm is None: - return + self.assertIsNotNone(self.trust_realm) site = 'Default-First-Site-Name' response_trust = self._call_get_dc_name(domain=self.trust_realm,