tests.component package#

Submodules#

tests.component.test_base module#

Tests for the base module.

class tests.component.test_base.TestComponent(methodName='runTest')[source]#

Bases: TestCase

Unit test class for the Component class.

This class tests the initialization of the Component class by creating a Component instance with a specific fetch function, a svelte component, and properties. It then asserts that the id, the data fetched by the fetch function, the svelte component, and the properties are as expected.

fetch_func#

A function that returns the data to be fetched.

Type:

function

comp#

An instance of the Component class.

Type:

Component

test_init()[source]#

Tests the initialization of the Component class.

test_init()[source]#

Tests the initialization of the Component class.

This method creates a Component instance with a specific fetch function, a svelte component, and properties. It then asserts that the id, the data fetched by the fetch function, the svelte component, and the properties are as expected.

class tests.component.test_base.TestDataSource(methodName='runTest')[source]#

Bases: TestCase

Unit test class for the DataSource class.

This class tests the initialization of the DataSource class by creating a DataSource instance with a specific id and a fetch function. It then asserts that the id and the data fetched by the fetch function are as expected.

fetch_func#

A function that returns the data to be fetched.

Type:

function

ds#

An instance of the DataSource class.

Type:

DataSource

test_init()[source]#

Tests the initialization of the DataSource class.

test_init()[source]#

Tests the initialization of the DataSource class.

This method creates a DataSource instance with a specific id and a fetch function. It then asserts that the id and the data fetched by the fetch function are as expected.

Module contents#