test_helpers: Move get_subscription out of actions.py.

It's no longer used by anything other than test code.
This commit is contained in:
Tim Abbott
2017-01-29 19:31:24 -08:00
parent 035e442b63
commit 01daa3e91a
4 changed files with 11 additions and 11 deletions

View File

@@ -1409,13 +1409,6 @@ def pick_color_helper(user_profile, subs):
else:
return STREAM_ASSIGNMENT_COLORS[len(used_colors) % len(STREAM_ASSIGNMENT_COLORS)]
def get_subscription(stream_name, user_profile):
# type: (Text, UserProfile) -> Subscription
stream = get_stream(stream_name, user_profile.realm)
recipient = get_recipient(Recipient.STREAM, stream.id)
return Subscription.objects.get(user_profile=user_profile,
recipient=recipient, active=True)
def validate_user_access_to_subscribers(user_profile, stream):
# type: (Optional[UserProfile], Stream) -> None
""" Validates whether the user can view the subscribers of a stream. Raises a JsonableError if: