Via a lot of guessing and checking, I've been able to get the tests working as they should using the example you posted above. 

The functions you have for card/set looked similar enough that I originally was basing it off that, but were working for me (probably related to the inability to nock out the URL requests in the subprocess exec)