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

stb#250 Create initial tests for refarm_redirects app #153

Merged
merged 2 commits into from
Jul 23, 2018

Conversation

duker33
Copy link
Collaborator

@duker33 duker33 commented Jul 22, 2018

@duker33 duker33 self-assigned this Jul 22, 2018
It should meet db constraint while adding.
"""
# hardcoded fixtures will be fixed with task in test ahead.
url_from, url_to = 2 * ['/catalog/categories/category-0/tags/6-v/']
Copy link
Contributor

Choose a reason for hiding this comment

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

url_from = url_to = '/catalog/categories/category-0/tags/6-v/'


# `url_from` should redirect to `url_to`
response = self.client.get(url_from)
self.assertEqual(response.status_code, 200)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we should test here the occurrence of an error after Redirect.objects.create(...) instead of this

@duker33 duker33 merged commit e0cc78d into master Jul 23, 2018
@duker33 duker33 deleted the stb250_too_many_redirects branch July 23, 2018 11:01
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.

None yet

2 participants