Skip to content

Commit

Permalink
83% need to test the generate random part
Browse files Browse the repository at this point in the history
  • 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.
8 changes: 1 addition & 7 deletions tests/test_settings.py
@@ -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

0 comments on commit 34f3a82

Please sign in to comment.