joey shelton / LED_Demo2

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by joey shelton

Embed: (wiki syntax)

« Back to documentation index

ConfigTests Class Reference

ConfigTests Class Reference

Public Member Functions

def setUp
def tearDown
def test_init_app_config
def test_init_no_app_config
def test_init_no_app_config_with_dir
def test_init_override_app_config

Detailed Description

Test cases for Config class

Definition at line 27 of file config_test.py.


Member Function Documentation

def setUp (   self )
Called before each test case

:return:

Definition at line 32 of file config_test.py.

def tearDown (   self )
Called after each test case

:return:

Definition at line 40 of file config_test.py.

def test_init_app_config (   self,
  mock_json_file_to_dict,
  _ 
)
Test that the initialisation correctly uses app_config

:param mock_json_file_to_dict: mock of function json_file_to_dict
:param _: mock of function _process_config_and_overrides (not tested)
:return:

Definition at line 50 of file config_test.py.

def test_init_no_app_config (   self,
  mock_json_file_to_dict,
  _ 
)
Test that the initialisation works without app config

:param mock_json_file_to_dict: mock of function json_file_to_dict
:param _: patch of function _process_config_and_overrides (not tested)
:return:

Definition at line 70 of file config_test.py.

def test_init_no_app_config_with_dir (   self,
  mock_json_file_to_dict,
  mock_isfile,
  _ 
)
Test that the initialisation works without app config and with a
specified top level directory

:param mock_json_file_to_dict: mock of function json_file_to_dict
:param _: patch of function _process_config_and_overrides (not tested)
:return:

Definition at line 87 of file config_test.py.

def test_init_override_app_config (   self,
  mock_json_file_to_dict,
  _ 
)
Test that the initialisation uses app_config instead of top_level_dir
when both are specified

:param mock_json_file_to_dict: mock of function json_file_to_dict
:param _: patch of function _process_config_and_overrides (not tested)
:return:

Definition at line 111 of file config_test.py.