def test_metadata_readRemoteMetaData_2(self): """verify readRemoteMetaData return empty metadata on error""" #jstr = """{"backup-today": "2019-01-02", "latest-complete": "2019-01-02-012345"}""" fakecomms = FakeRemoteComms(1, "No such file or directory") metadata = MetaData(self.log, fakecomms, self.settings) self.assertEqual(metadata.readRemoteMetaData(), "{}")
def test_metadata_readRemoteMetaData_1(self): """verify readRemoteMetaData""" jstr = """{"backup-today": "2019-01-02", "latest-complete": "2019-01-02-012345"}""" fakecomms = FakeRemoteComms(0, jstr) metadata = MetaData(self.log, fakecomms, self.settings) self.assertEqual(metadata.readRemoteMetaData(), jstr)