-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lnksz
committed
Oct 1, 2017
1 parent
1962f58
commit 12a4819
Showing
4 changed files
with
47 additions
and
4 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
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
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
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 |
---|---|---|
|
@@ -7,9 +7,15 @@ | |
import json | ||
|
||
|
||
class RivusTest(unittest.TestCase): | ||
class RivusUtilsTest(unittest.TestCase): | ||
|
||
def test_parameter_range(self): | ||
"""Load minimal example data and test with one of the parameters | ||
+ Tests for side-effects on the original. | ||
+ Tests for the awaited numer of parameters. | ||
+ Tests for range of the parameters | ||
""" | ||
proj_name = 'mnl' | ||
base_directory = os.path.join('data', proj_name) | ||
data_spreadsheet = os.path.join(base_directory, 'data.xlsx') | ||
|
@@ -44,6 +50,27 @@ def test_parameter_range(self): | |
msg='Got parameter smaller than awaited.') | ||
|
||
def test_email_notification(self): | ||
"""It only can test, whether the notification function run trhrough | ||
successfully. | ||
Can be useful for quick testing the email parameters in the config file | ||
Note | ||
----- | ||
Requires a ``config.json`` file in the root of rivus-repo with the | ||
database credentials. For Example: | ||
:: | ||
{ | ||
"email" : { | ||
"s_user" : "[email protected]", | ||
"s_pass" : "TheAnswerIs42!", | ||
"r_user" : "[email protected]", | ||
"smpt_addr" : "smtp.gmail.com", | ||
"smpt_port" : "587" | ||
} | ||
} | ||
""" | ||
# Concatenate the absolute path to the config file. | ||
# conf_path = __file__[:-len('rivus/tests/utils.py')] + 'config.json' | ||
conf_path = os.path.join(pdir(pdir(pdir(__file__))), 'config.json') | ||
|