Skip to content

Commit

Permalink
Use the same database for all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Jul 11, 2017
1 parent 1258442 commit 197c8b9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tests/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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

Expand Down

0 comments on commit 197c8b9

Please sign in to comment.