cookbase.tests

Module contents

Testing suite for the cookbase package and submodules.

Submodules

cookbase.tests.test_db

class cookbase.tests.test_db.TestDBHandler(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test class for the cookbase.db.handler module.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test___init__()[source]

Tests the cookbase.db.handler.DBHandler constructor method.

test_close_connections()[source]

Tests the cookbase.db.handler.DBHandler.close_connections() method.

test_exhaustive = True
test_get_cba()[source]

Tests the cookbase.db.handler.DBHandler.get_cba() method.

test_get_cbi()[source]

Tests the cookbase.db.handler.DBHandler.get_cbi() method.

test_get_cbp()[source]

Tests the cookbase.db.handler.DBHandler.get_cbp() method.

test_get_cbr()[source]

Tests the cookbase.db.handler.DBHandler.get_cbr() method.

test_get_db_client()[source]

Tests the cookbase.db.handler.DBHandler.get_db_client() method.

test_insert_cbr()[source]

Tests the cookbase.db.handler.DBHandler.insert_cbr() method.

cookbase.tests.test_termcode

class cookbase.tests.test_termcode.Test(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test class for the cookbase.parsers.termcode module.

test_termcode()[source]

Tests the cookbase.parsers.termcode.to_int() and cookbase.parsers.termcode.to_str() methods.

cookbase.tests.test_validation

class cookbase.tests.test_validation.TestCbrValidation(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test class for the cookbase.validation.cbr module.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test__store(mock_insert_cbr)[source]

Tests the cookbase.validation.cbr.Validator._store method.

test_apply_validation_rules()[source]

Tests the cookbase.validation.cbr.Validator.apply_validation_rules() method.

test_exhaustive = False
test_validate(mock_jsonschema_validate, mock_apply_validation_rules, mock__store)[source]

Tests the cookbase.validation.cbr.Validator.validate method.