Parcourir la source

[1288] cleanups for MockDataSrcClient.get_soa:
- use the initialized zone name for the owner instead of the hardcoded one
- removed a redundant return
for now these don't affect the test results, but it's cleaner and may
have a substantial difference in future extensions.

JINMEI Tatuya il y a 13 ans
Parent
commit
fe04c93778
1 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. 2 3
      src/bin/xfrout/tests/xfrout_test.py.in

+ 2 - 3
src/bin/xfrout/tests/xfrout_test.py.in

@@ -77,8 +77,8 @@ class MockDataSrcClient:
     def get_soa(self):  # emulate ZoneIterator.get_soa()
         if self._zone_name == Name('nosoa.example.com'):
             return None
-        soa_rrset = RRset(Name('multisoa.example.com'), RRClass.IN(),
-                          RRType.SOA(), RRTTL(3600))
+        soa_rrset = RRset(self._zone_name, RRClass.IN(), RRType.SOA(),
+                          RRTTL(3600))
         soa_rrset.add_rdata(Rdata(RRType.SOA(), RRClass.IN(),
                                   'master.example.com. ' +
                                   'admin.example.com. 1234 ' +
@@ -88,7 +88,6 @@ class MockDataSrcClient:
                                       'master.example.com. ' +
                                       'admin.example.com. 1300 ' +
                                       '3600 1800 2419200 7200'))
-            return soa_rrset
         return soa_rrset
 
 class MyCCSession(isc.config.ConfigData):