Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mordecai docs and tests (closes #93) #98

Merged
merged 5 commits into from
Jul 6, 2016
Merged

Add Mordecai docs and tests (closes #93) #98

merged 5 commits into from
Jul 6, 2016

Conversation

ahalterman
Copy link
Member

  • Add documentation about geolocation options
  • Add unit test for Mordecai

The unit tests only covers the query to the Mordecai service, not the larger pipeline, because as configured it has to hit the Mongo db again. We could break apart the mordecai function into a db calling function and an info bundling function, but I think the potential for messing things up there is greater than the benefit from having better tests.

@ahalterman
Copy link
Member Author

ahalterman commented Jul 5, 2016

Gross. Obviously this test is only going to work if Mordecai is running on Travis, which will require docker-compose and 20 minutes. @johnb30, worth it?

@johnb30
Copy link
Member

johnb30 commented Jul 6, 2016

You'd want to build a mock of the object somehow. You're not wanting to actually test whether mordecai returns the right results. Instead you're testing if you can send a thing and then process the results in the proper manner. Something like this might help.

@ahalterman
Copy link
Member Author

I'm merging now with just the minimal test and the documentation. Better test coverage will require a significant re-writing of the geolocation functions. See #99.

@ahalterman ahalterman merged commit af5c2b0 into master Jul 6, 2016
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.

2 participants