def test_get_response(self): self.responses = [''] self.assertEqual( 'preserve old value', Reconciler.get_response('prompt', 'preserve old value') ) self.responses = ['new value'] self.assertEqual( 'new value', Reconciler.get_response('prompt', 'old value') )
def test_get_response_with_none(self): """ None should be preserve for no response""" self.responses = [''] self.assertIsNone(Reconciler.get_response('prompt', None)) self.responses = [''] self.assertEqual('', Reconciler.get_response('prompt', ''))