From 9351bf6632e1c5e98a901384d9435a6793614542 Mon Sep 17 00:00:00 2001 From: Gunther Cox Date: Tue, 11 Jul 2017 06:54:02 -0400 Subject: [PATCH] Use the same database for all tests --- tests/base_case.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/base_case.py b/tests/base_case.py index fca2f63fa..1f128bf1d 100644 --- a/tests/base_case.py +++ b/tests/base_case.py @@ -31,13 +31,6 @@ def get_kwargs(self): 'database': None } - def random_string(self, start=0, end=9000): - """ - Generate a string based on a random number. - """ - from random import randint - return str(randint(start, end)) - class ChatBotMongoTestCase(ChatBotTestCase): @@ -58,7 +51,7 @@ def setUpClass(cls): def get_kwargs(self): kwargs = super(ChatBotMongoTestCase, self).get_kwargs() - kwargs['database'] = self.random_string() + kwargs['database'] = 'chatterbot_test_database' kwargs['storage_adapter'] = 'chatterbot.storage.MongoDatabaseAdapter' return kwargs