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

Revert "Break up test_views.py so structure matches views directory" #1624

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions django/cantusdb_project/main_app/tests/make_fakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,3 @@ def make_fake_source(
source.other_editors.set([make_fake_user()])

return source


def get_random_search_term(target):
"""Helper function for generating a random slice of a string.

Args:
target (str): The content of the field to search.

Returns:
str: A random slice of `target`
"""
if len(target) <= 2:
search_term = target
else:
slice_start = random.randint(0, len(target) - 2)
slice_end = random.randint(slice_start + 2, len(target))
search_term = target[slice_start:slice_end]
return search_term
Loading
Loading