tests.models.output.definitions package — django_analyses 0.0.3 documentation

# tests.models.output.definitions package

## Submodules

## tests.models.output.definitions.test_file_output_definition module

class `tests.models.output.definitions.test_file_output_definition.` `FileOutputDefinitionTestCase`(methodName='runTest')

  Bases: `django.test.testcases.TestCase`

  Tests for the `FileOutputDefinition` model.

  `setUp`()

    Adds the created instances to the tests’ contexts. For more information see unittest’s `setUp()` method.

  `test_get_type`()

    Tests the `get_type()` method returns the expected value.

  `test_output_class_attribute`()

    Test the output_class attribute is set to `FileOutput`.

## tests.models.output.definitions.test_float_output_definition module

class `tests.models.output.definitions.test_float_output_definition.` `FloatOutputDefinitionTestCase`(methodName='runTest')

  Bases: `django.test.testcases.TestCase`

  Tests for the `FloatOutputDefinition` model.

  `setUp`()

    Adds the created instances to the tests’ contexts. For more information see unittest’s `setUp()` method.

  `test_get_type`()

    Tests the `get_type()` method returns the expected value.

  `test_output_class_attribute`()

    Test the output_class attribute is set to `FloatOutput`.

## tests.models.output.definitions.test_output_definition module

class `tests.models.output.definitions.test_output_definition.` `OutputDefinitionTestCase`(methodName='runTest')

  Bases: `django.test.testcases.TestCase`

  Tests for the `OutputDefinition` model.

  `setUp`()

    Adds the created instances to the tests’ contexts. For more information see unittest’s `setUp()` method.

  `test_create_output_instance_raises_type_error`()

    Tests that calling the `create_output_instance()` raises a ValidationError. This is the expected behavior as long as the output_class attribute is not defined (or ill defined).

  `test_create_output_instance_reraises_uncaught_exception`()

    Tests that calling the `create_output_instance()` method when output_class is properly set but invalid kwargs still raises an exception.

  `test_create_output_instance_with_non_model_value_raises_type_error`()

    Tests that calling the `create_output_instance()` with a non-model value raises a ValidationError.

  `test_create_output_instance_with_non_output_subclass_value_raises_type_error`()

    Tests that calling the `create_output_instance()` with a non-`Output` model subclass value raises a ValidationError.

  `test_custom_manager_is_assigned`()

    Tests that the manager is assigned to be the custom `OutputDefinitionManager` class.

  `test_description_blank_and_null`()

    Tests that the description field may be blank or null.

  `test_key_blank_and_null`()

    Tests that the key field may not be blank or null.

  `test_key_is_not_unique`()

    Tests that the key field is not unique.

  `test_key_max_length`()

    Test the max_length of the key field.

  `test_ordering`()

    Test the ordering.

  `test_output_class_is_none`()

    Tests that the output_class class attribute is set to None. This is meant to be overriden by a `Output` instance.

  `test_resetting_output_class_to_valid_output_subclass`()

    Tests that the `check_output_class_definition()` method does not raise a ValidationError when setting output_class to some valid Output model subclass.

  `test_string`()

    Test the string output.

## Module contents