mirror of
				https://github.com/github/octodns.git
				synced 2024-05-11 05:55:00 +00:00 
			
		
		
		
	Consistently order changes :-/
Many providers make their modifications in the order that changes comes. In python3 this causes things to be inconsistently ordered. That mostly works, but could result in hidenbugs (e.g. Route53Provider's batching could be completely different based on the order it sees changes.) Sorting changes consistently is a good thing and it shouldn't hurt situations where providers are already doing their own ordering. All-in-all more consistent is better and we have to be explicit with python 3.
This commit is contained in:
		@@ -400,9 +400,9 @@ class TestNs1Provider(TestCase):
 | 
			
		||||
        self.assertEquals(3, got_n)
 | 
			
		||||
        nsone_zone.loadRecord.assert_has_calls([
 | 
			
		||||
            call('unit.tests', u'A'),
 | 
			
		||||
            call('geo', u'A'),
 | 
			
		||||
            call('delete-me', u'A'),
 | 
			
		||||
        ], any_order=True)
 | 
			
		||||
            call('geo', u'A'),
 | 
			
		||||
        ])
 | 
			
		||||
        mock_record.assert_has_calls([
 | 
			
		||||
            call.update(answers=[{'answer': [u'1.2.3.4'], 'meta': {}}],
 | 
			
		||||
                        filters=[],
 | 
			
		||||
@@ -410,6 +410,8 @@ class TestNs1Provider(TestCase):
 | 
			
		||||
            call.update(answers=[{u'answer': [u'1.2.3.4'], u'meta': {}}],
 | 
			
		||||
                        filters=[],
 | 
			
		||||
                        ttl=32),
 | 
			
		||||
            call.delete(),
 | 
			
		||||
            call.delete(),
 | 
			
		||||
            call.update(
 | 
			
		||||
                answers=[
 | 
			
		||||
                    {u'answer': [u'101.102.103.104'], u'meta': {}},
 | 
			
		||||
@@ -427,9 +429,7 @@ class TestNs1Provider(TestCase):
 | 
			
		||||
                    {u'filter': u'select_first_n', u'config': {u'N': 1}},
 | 
			
		||||
                ],
 | 
			
		||||
                ttl=34),
 | 
			
		||||
            call.delete(),
 | 
			
		||||
            call.delete()
 | 
			
		||||
        ], any_order=True)
 | 
			
		||||
        ])
 | 
			
		||||
 | 
			
		||||
    def test_escaping(self):
 | 
			
		||||
        provider = Ns1Provider('test', 'api-key')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user