memoQFileTest.py 506 B

1234567891011121314151617181920
  1. import unittest
  2. import memoQFile
  3. import os
  4. class memoQFileTest(unittest.TestCase):
  5. def test_upload_download_file(self):
  6. test = memoQFile.MemoQFile()
  7. file_guid = test.upload_file("testFiles/test.txt")
  8. self.assertNotEqual(file_guid, None, "Guid shouldn't equal none!")
  9. file_path = test.download_file(".", file_guid)
  10. self.assertTrue(os.path.isfile(file_path), "File should exist!")
  11. os.remove(file_path)
  12. if __name__ == "__main__":
  13. unittest.main()