send-cli icon indicating copy to clipboard operation
send-cli copied to clipboard

Write tests for functions that interact with a send server

Open ehuggett opened this issue 8 years ago • 0 comments

none of the api_* functions currently have any tests.

  • Something like https://pypi.python.org/pypi/requests-mock may be of use here
  • Running the tests against a local send server would give more meaningful results
    • might make the tests harder to run (as they will now require Send and all of its dependencies).
    • tests would probably have to be run in a specific order and may become dependant upon each other (ie upload before download, and download would need the url created by upload)
    • A send server can be started within Travis, it seems unlikely the Firefox Send project would want my tests being run against their service

It would be very interesting to attempt to ensure compatibility with the official client by using https://developer.mozilla.org/en-US/Firefox/Headless_mode#Automated_testing_with_headless_mode (upload with browser + download with send-cli and vice versa), there are some tests in Firefox Send that may be relevant/reusable here.

ehuggett avatar Nov 09 '17 12:11 ehuggett