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:
Tim Abbott
2018-03-12 11:35:28 -07:00
parent ee2b8bfbfb
commit 5f3fa2c6b6

View File

@@ -1544,7 +1544,7 @@ def get_huddle_backend(huddle_hash: Text, id_list: List[int]) -> Huddle:
Subscription.objects.bulk_create(subs_to_create)
return huddle
def clear_database() -> None:
def clear_database() -> None: # nocoverage # Only used in populate_db
pylibmc.Client(['127.0.0.1']).flush_all()
model = None # type: Any
for model in [Message, Stream, UserProfile, Recipient,