-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support blocking user accounts #614
Conversation
5dd2d93
to
698de4d
Compare
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.
Minor typos else LGTM!
|
||
self.assertFalse(self.is_blocked(self.contributor.id)) | ||
|
||
def test_follow_invalid_user_id(self): |
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.
Do you mean test_unblock_invalid_user_id
?
super(TestUserBlockedRest, self).setUp() | ||
self._prefix = '/users/blocked' | ||
|
||
def test_follow_unauthorized(self): |
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.
test_blocked_unauthorized
errors = body.get('errors') | ||
self.assertIsNotNone(self.get_error(errors, 'id')) | ||
|
||
def test_following_wrong_user_id(self): |
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.
test_blocked_wrong_user_id
super(TestUserBlockedAllRest, self).setUp() | ||
self._prefix = '/users/blocked' | ||
|
||
def test_follow_unauthenticated(self): |
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.
test_blocked_unauthenticated
698de4d
to
725c14b
Compare
Thanks for the review. |
First PR with an Alembic job to run in demo/prod :P |
Yes! I think in our current upgrade demo/prod procedure we are not yet running an Alembic upgrade. But this should not be a problem, @arnaud-morvan? |
The wiki explains how to make an alembic upgrade in the demo:
No mention in the prod upgrade howto but I guess it's the same? For a dev env, I guess one should simply run
as explained at https://github.com/c2corg/v6_api/tree/master/alembic_migration#run-a-migration |
I've added the alembic migration to prod upgrade wiki page. |
Related to #484
Requires c2corg/pydiscourse#1