mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
models: Don't require test coverage for clear_database.
This function is only used in populate_db, not at runtime, and is inefficient to test, since it's main role is deleting everything in the database.
This commit is contained in:
@@ -1544,7 +1544,7 @@ def get_huddle_backend(huddle_hash: Text, id_list: List[int]) -> Huddle:
|
|||||||
Subscription.objects.bulk_create(subs_to_create)
|
Subscription.objects.bulk_create(subs_to_create)
|
||||||
return huddle
|
return huddle
|
||||||
|
|
||||||
def clear_database() -> None:
|
def clear_database() -> None: # nocoverage # Only used in populate_db
|
||||||
pylibmc.Client(['127.0.0.1']).flush_all()
|
pylibmc.Client(['127.0.0.1']).flush_all()
|
||||||
model = None # type: Any
|
model = None # type: Any
|
||||||
for model in [Message, Stream, UserProfile, Recipient,
|
for model in [Message, Stream, UserProfile, Recipient,
|
||||||
|
|||||||
Reference in New Issue
Block a user