Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Convert MobileQueryStringOverrideTest to an ElasticTestCase. #29

Closed
wants to merge 1 commit into from

Conversation

mythmon
Copy link
Contributor

@mythmon mythmon commented Sep 14, 2012

Since MobileQueryStringOverrideTest accesses the dashboard (since the dashboard is the front page), it needs to be using the correct elastic search index, so it needs to be a ElasticTestCase, instead of a normal TestCase.

The upshot of all this is that Jenkins will stop being angry for no good reason about this test.

r?

@@ -15,12 +21,11 @@ def test_mobile_override(self):
# Doing a request and specifying the mobile querystring
# parameter should persist that value in the MOBILE cookie.
resp = self.client.get(reverse('home_view'), {
'mobile': 1
})
'mobile': 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This should be at two indentation levels. The first is the (, the second is the {. So it was correct initially.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, first, I never heard the rule explained like that, now things make a lot more sense.

Second, the reason I did this is because a new linter I had was complaining about it, but that linter is being more annoying than it is worth, so it is going away.

@willkg
Copy link
Member

willkg commented Sep 17, 2012

This works great! I had two nits, but r+.

Since MobileQueryStringOverrideTest accesses the dashboard (since the
dashboard is the front page), it needs to be using the correct elastic
search index, so it needs to be a ElasticTestCase, instead of a normal
TestCase.
@mythmon
Copy link
Contributor Author

mythmon commented Sep 17, 2012

Landed in 36ff739.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants