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

Fix #3297 - Updated dev_ver_url value #5467

Merged
merged 4 commits into from May 24, 2017

Conversation

Projects
None yet
3 participants
@harikishen
Copy link
Contributor

commented May 22, 2017

I have updated editors/helpers.py. The value of dev_ver_url is updated based on the value of version.channel

Hope this fixes #3297

@eviljeff
Copy link
Member

left a comment

Add this test:

    def test_dev_versions_url_in_context(self):
        self.helper.set_data(self.get_data())
        context_data = self.helper.handler.get_context_data()
        assert context_data['dev_versions_url'] == absolutify(
            self.addon.get_dev_url('versions'))

        self.version.update(channel=amo.RELEASE_CHANNEL_UNLISTED)
        context_data = self.helper.handler.get_context_data()
        assert context_data['dev_versions_url'] == absolutify(
            reverse('devhub.addons.versions', args=[self.addon.id]))
@@ -577,6 +576,11 @@ def get_context_data(self):
if (self.version and
self.version.channel == amo.RELEASE_CHANNEL_UNLISTED):
review_url_kw['channel'] = 'unlisted'
dev_ver_url = reverse(
'devhub.addons.versions',
args=[self.version.id])

This comment has been minimized.

Copy link
@eviljeff

eviljeff May 23, 2017

Member

this should be args=[self.addon.id])

@harikishen

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2017

Fixed the flake8 issue which travis ci showed :P

@eviljeff
Copy link
Member

left a comment

Thanks!

@eviljeff eviljeff merged commit 2069d63 into mozilla:master May 24, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@harikishen harikishen deleted the harikishen:ticket_3297 branch May 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.