-
Couldn't load subscription status.
- Fork 551
Remove waffle flag '2fa-enforcement-for-developers-and-special-users' #24018
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
Open
wagnerand-moz
wants to merge
2
commits into
mozilla:master
Choose a base branch
from
wagnerand-moz:i15891
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -916,7 +916,6 @@ def setUp(self): | |
| self.client.force_login_with_2fa(UserProfile.objects.get(email='[email protected]')) | ||
| self.user = UserProfile.objects.get(email='[email protected]') | ||
| self.user.update(last_login_ip='192.168.1.1') | ||
| self.create_flag('2fa-enforcement-for-developers-and-special-users') | ||
|
|
||
| def _submit_actions(self, doc): | ||
| return doc('form[name=api-credentials-form] button[type=submit][name=action]') | ||
|
|
@@ -1283,7 +1282,6 @@ def setUp(self): | |
| self.client.force_login(self.user) | ||
| self.url = reverse('devhub.upload') | ||
| self.xpi_path = self.file_path('webextension_no_id.xpi') | ||
| self.create_flag('2fa-enforcement-for-developers-and-special-users') | ||
|
|
||
| def post(self, theme_specific=False, **kwargs): | ||
| data = { | ||
|
|
@@ -1452,17 +1450,6 @@ def test_upload_extension_without_2fa(self): | |
| } | ||
| } | ||
|
|
||
| def test_upload_extension_without_2fa_waffle_is_off(self): | ||
| self.create_flag( | ||
| '2fa-enforcement-for-developers-and-special-users', everyone=False | ||
| ) | ||
| self.url = reverse('devhub.upload') | ||
| response = self.post() | ||
| upload = FileUpload.objects.get() | ||
| assert upload.channel == amo.CHANNEL_LISTED | ||
| url = reverse('devhub.upload_detail', args=[upload.uuid.hex, 'json']) | ||
| self.assert3xx(response, url) | ||
|
|
||
| def test_upload_theme_without_2fa(self): | ||
| self.xpi_path = os.path.join( | ||
| settings.ROOT, 'src/olympia/devhub/tests/addons/static_theme.zip' | ||
|
|
@@ -2064,7 +2051,7 @@ def test_doc_urls(self): | |
| assert '/en-US/developers/docs/te' == reverse('devhub.docs', args=['te']) | ||
| assert '/en-US/developers/docs/te/st', reverse('devhub.docs', args=['te/st']) | ||
|
|
||
| self.client.force_login(user_factory(read_dev_agreement=None)) | ||
| self.client.force_login_with_2fa(user_factory(read_dev_agreement=None)) | ||
| response = self.client.get(reverse('devhub.submit.agreement')) | ||
| doc = pq(response.content) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the code needs a real user we may as well use
user_factoryto create one rather thanAnonymousUserThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that. I didn't want to make large changes to this test as I don't understand what exactly it is testing and more change tends to lead to more breaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eviljeff I think I'd need some more guidance here. I am not sure how I can use
user_factoryhere (without rewriting the entire test class I guess?) when user properties like id and email are set per individual test, e.g.identity = identity or {'uid': '1234', 'email': '[email protected]'}.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'd change it to something like
identity = {'uid': self.user.fxa_id, 'email': self.user.email}when it was supposed to be correct. But I'm having difficulties with switching it out foruser_factory()- it seems to be redirecting to login instead (and so breaking all the tests) which is weird. It's probably just bad tests but I'm going to play around with it some more to confirm to myself there's not something actually broken.