def test_soa_getset(self): z = Zone() record = {'ttl': '@', 'addr': 'ns1.example.com.', 'owner': 'hostmaster.example.com', 'serial': '2003080800', 'refresh': '12h', 'update-retry': '15m', 'expiry': '3w', 'minimum': '3h'} self.assertEqual(z.soa(), []) self.assertEqual(z.soa(record), [{'ttl': '@', 'addr': 'ns1.example.com.', 'owner': 'hostmaster.example.com', 'serial': '2003080800', 'refresh': '12h', 'update-retry': '15m', 'expiry': '3w', 'minimum': '3h'}]) record = {'ttl': '@', 'addr': 'ns1.example.com.', 'owner': 'hostmaster.example.com', 'serial': '2003080800', 'refresh': '12h', 'update-retry': '15m', 'expiry': '3w', 'minimum': '4h'} self.assertEqual(z.soa(record), [{'ttl': '@', 'addr': 'ns1.example.com.', 'owner': 'hostmaster.example.com', 'serial': '2003080800', 'refresh': '12h', 'update-retry': '15m', 'expiry': '3w', 'minimum': '4h'}])