Skip to content

Test suite improvements - #68

Merged
codelucas merged 4 commits into
codelucas:masterfrom
karls:test-suite-improvements
Jul 30, 2014
Merged

Test suite improvements#68
codelucas merged 4 commits into
codelucas:masterfrom
karls:test-suite-improvements

Conversation

@karls

@karls karls commented Jul 29, 2014

Copy link
Copy Markdown
Contributor

Don't do HTTP requests in tests.

karls added 3 commits July 24, 2014 10:55
Mock out any real HTTP requests made from within tests. Responses are
now deterministic, as the body of the response is loaded from a HTML file.
@codelucas

Copy link
Copy Markdown
Owner

Hallelujah! Let me read this over and test it locally before merging.
👍 for explicit versions in requirements.txt.

@jeffnappi

Copy link
Copy Markdown
Contributor

vcrpy may also be good for this: https://github.com/kevin1024/vcrpy

@karls

karls commented Jul 30, 2014

Copy link
Copy Markdown
Contributor Author

@jeffnappi that's a good shout, cheers!

I think it's up to @codelucas, ultimately. Personally, I think it might be a good idea to introduce something like vcrpy when we have a larger test suite. I'm not opposed to doing it straight away, though, if people think it's more benficial.

@codelucas

Copy link
Copy Markdown
Owner

@karls Upon looking at this here are a few bugs that I found:
The responses library is being imported but it isn't included in the requirements.txt.
The mock library is included in requirements.txt but never used.

Everything else works perfectly!
But please update as needed, thanks. I'll merge this by the end of today after you update.

@karls

karls commented Jul 30, 2014

Copy link
Copy Markdown
Contributor Author

@codelucas responses was actually in requirements.txt, but it's currently installed from my fork of the library, because I have an upstream patch that adds regex URL matching, but it's not merged yet. As soon as I get this merged, we can switch to the original one.

mock was just a hangover from some experimentation that I did, whoops.

Have another look over it and let me know if anything else needs changing.

@codelucas

Copy link
Copy Markdown
Owner

Got it, i'm going to merge this and expect the third diff to come shortly!

codelucas added a commit that referenced this pull request Jul 30, 2014
@codelucas
codelucas merged commit 0066978 into codelucas:master Jul 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants