contrib_bots: Restructure bots to follow a consistent structure.

Now all the bots that are stored in contrib_bots are in the
same file/directory format.
The format is specified here #3427. Add tests.py file for encrypt_bot as well.
Fixes #3427.
This commit is contained in:
Abhijeet Kaur 2017-02-09 02:35:24 +05:30 committed by showell
parent 2282000d78
commit 0419848d3c
42 changed files with 79 additions and 45 deletions

View file

@ -15,10 +15,10 @@ CONTRIB_BOTS_DIR = os.path.dirname(os.path.abspath(__file__))
os.chdir(os.path.dirname(CONTRIB_BOTS_DIR))
sys.path.insert(0, os.path.dirname(CONTRIB_BOTS_DIR))
JOKES_PATH = os.path.join(CONTRIB_BOTS_DIR, 'John/var/jokes.json')
DATABASE_PATH = os.path.join(CONTRIB_BOTS_DIR, 'John/var/database.db')
DIRECTORY_PATH = os.path.join(CONTRIB_BOTS_DIR, 'John')
VAR_PATH = os.path.join(CONTRIB_BOTS_DIR, 'John/var')
JOKES_PATH = os.path.join(CONTRIB_BOTS_DIR, 'assets/var/jokes.json')
DATABASE_PATH = os.path.join(CONTRIB_BOTS_DIR, 'assets/var/database.db')
DIRECTORY_PATH = os.path.join(CONTRIB_BOTS_DIR, 'assets')
VAR_PATH = os.path.join(CONTRIB_BOTS_DIR, 'assets/var')
if not os.path.exists(DIRECTORY_PATH):
os.makedirs(DIRECTORY_PATH)