apps.api.tests package

Submodules

apps.api.tests.test_areas module

class apps.api.tests.test_areas.DeviceTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

setUp()[source]

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

test_add_new_area()[source]
test_delete_area()[source]
test_get_list_of_areas()[source]
test_get_specific_area()[source]
test_update_specific_area()[source]

apps.api.tests.test_device module

class apps.api.tests.test_device.DeviceTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

setUp()[source]

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

test_add_bad_ip_address()[source]
test_add_bad_type()[source]
test_add_new_devices_by_type()[source]
test_delete_device_by_type()[source]
class apps.api.tests.test_device.DeviceTypeTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

setUp()[source]

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

test_list_of_device_types()[source]

apps.api.tests.test_device_types module

class apps.api.tests.test_device_types.DeviceTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

setUp()[source]

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

test_add_new_device_type()[source]
test_delete_device_type()[source]
test_get_list_of_device_types()[source]
test_get_specific_device_type()[source]
test_update_specific_device_type()[source]

apps.api.tests.test_measurement module

class apps.api.tests.test_measurement.MeasurementTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

classmethod setUpClass() None[source]

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass() None[source]

Hook method for deconstructing the class fixture after running all tests in the class.

test_create_measurement_with_invalid_device_id()[source]
test_create_measurement_with_invalid_physical_units_id()[source]
test_create_measurement_with_invalid_sensor_id()[source]
test_create_multiple_measurements()[source]
test_create_single_measurement()[source]
test_get_last_measurement()[source]
test_get_last_measurement_with_invalid_device_id()[source]
test_get_measurement_from_period_with_parameters()[source]
test_get_measurement_from_period_without_parameters()[source]
test_get_measurements_list_with_invalid_device_id()[source]
test_get_measurements_list_with_invalid_time_from_bigger_than_time_to()[source]
test_get_measurements_list_with_invalid_time_from_parameter()[source]
test_get_measurements_list_with_invalid_time_to_parameter()[source]
test_post_empty_dict_in_measurement_list()[source]
test_post_empty_measurement_list()[source]

apps.api.tests.test_reservations module

class apps.api.tests.test_reservations.ReservationTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass()[source]

Hook method for deconstructing the class fixture after running all tests in the class.

test_delete_already_deleted_reservation()[source]
test_delete_non_existing_reservation()[source]
test_delete_reservation()[source]
test_get_all_reservations_for_area()[source]
test_get_reservations_for_non_existing_area()[source]
test_post_invalid_area_id_id_reservation()[source]
test_post_overlapping_reservation()[source]
test_post_two_valid_reservation_for_same_area()[source]
test_post_valid_reservation()[source]
test_put_invalid_reservation()[source]
test_put_valid_reservation()[source]

apps.api.tests.test_sensor module

class apps.api.tests.test_sensor.SensorTestCase(methodName='runTest')[source]

Bases: rest_framework.test.APITestCase

classmethod setUpClass() None[source]

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass() None[source]

Hook method for deconstructing the class fixture after running all tests in the class.

test_create_empty_list_of_sensors() None[source]
test_create_multiple_sensors() None[source]
test_create_single_sensor() None[source]
test_delete_multiple_sensors_by_empty_type() None[source]
test_delete_multiple_sensors_by_invalid_type() None[source]
test_delete_multiple_sensors_by_type() None[source]
test_delete_non_existing_sensor() None[source]
test_delete_sensor() None[source]
test_get_multiple_sensors_by_empty_type() None[source]
test_get_multiple_sensors_by_type() None[source]
test_get_non_existing_sensor() None[source]
test_get_non_existing_sensors_by_type() None[source]
test_get_sensor() None[source]
test_update_non_existing_sensor() None[source]
test_update_sensor() None[source]
test_update_sensor_invalid_values() None[source]

Module contents