Closed iandouglas closed 8 years ago
hi @iandouglas =)
Hey @iandouglas!!
Jut to confirm, are you asking for the client to default to a mocked interface if the .env is still set as the default (no entries)
Since this client doesn't call a specific API, what would the mocked interface return to the user?
@mbernier @iandouglas is right. The tests are very binded to SG usage and require dependencies that are not necessary to test the overall functionality of this agnostic client.
The mocked server would ensure that the data being passed is properly formatted/present (payload, URI, method, headers). In response you can set up dummy data that you later ensure that the library is properly parsing and assigning it to each request. So if you change the core of the library, your tests would catch if it broke the overall functionality.
cc/ @thinkingserious
Love the feedback everyone, I'll be implementing these ideas. Thanks!
Fixed with: #5
As quick as it is to set up a simple CRUD interface in something like Flask, a user shouldn't be forced to set up entries in .env in order to run tests. Tests should have a mocked service available to run without any setup by the user.