def checkan(acs, n): self.m.reset_mock() afh = AccFileHandler('prog', 'version', 'filename', 'utf-8', '#', ':', n, 'password', 4) afh.start() afh.save_accounts(acs) afh.end()
def checkver(ver): self.m.reset_mock() afh = AccFileHandler('prog', ver, 'filename', 'utf-8', '#', ':', 5, 'password', 4) afh.start() afh.save_accounts([]) afh.end() out = self.ostream.mock_calls[0][1][0] return out
def checka(acs): self.m.reset_mock() afh = AccFileHandler('prog', 'version', 'filename', 'utf-8', '#', ':', 3, 'password', 4) afh.start() afh.save_accounts(acs) afh.end() out = [i[1][0] for i in self.ostream.mock_calls] out = out[2:] # remove comment return out