Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
83% need to test the generate random part
- Loading branch information
Chih-Jung Chen
committed
Mar 14, 2019
1 parent
f749860
commit 34f3a82
Showing
1 changed file
with
1 addition
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
"""Testing settings""" | ||
import pytest | ||
import settings | ||
import os | ||
|
||
def test_find_or_create_secret_key(): | ||
"""test if key is 50 characters""" | ||
key = settings.find_or_create_secret_key() | ||
assert len(key) == 50 | ||
|
||
def test_if_generate_random_key(): | ||
"""see if it generates a ranfom key of key is not provided""" | ||
settings.SECRET_KEY_DIR = None | ||
settings.SECRET_KEY_FILEPATH = None | ||
key = settings.find_or_create_secret_key() | ||
assert len(key) == 50 |