]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Assert trust realm is not None
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 25 May 2023 22:10:02 +0000 (10:10 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 14 Jun 2023 22:57:35 +0000 (22:57 +0000)
This is consistent with the other tests in this file.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/getdcname.py

index f6c4ea2e88c092d40bd53c058d6870abcb639d79..6dbe7aba454b1dc0b4e4fe4ee05792b83cc9cb66 100644 (file)
@@ -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,