예제 #1
0
 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()
예제 #2
0
 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
예제 #3
0
 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