From 1c868d21c0b1d89640e103245e4aa0961e27c12e Mon Sep 17 00:00:00 2001 From: Fred Z Date: Fri, 27 Jul 2018 22:14:53 +0200 Subject: [PATCH] Adds test wrong file to 'sql_create_db()' --- db.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db.py b/db.py index 7374344..350b44f 100644 --- a/db.py +++ b/db.py @@ -18,7 +18,7 @@ CONFIG = { 'pass': 'loff', 'db': 'loff', 'char': 'utf8', - 'file': 'create-db-loff.sl' + 'file': 'create-db-loff.sql' } DB_NOT_FOUND = True @@ -29,6 +29,11 @@ def sql_create_db(filename=CONFIG['file']): Get the SQL instruction to create the DB for file :return: a list of each SQL query whithout the trailing ";" + + :Tests: + >>> sql_create_db('wronq_file.sql') + File load error : wronq_file.sql + False """ from os import path