| Total Complexity | 4 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from django.test import TestCase |
||
| 7 | class LocalizedIntegerFieldTestCase(TestCase): |
||
| 8 | |||
| 9 | @staticmethod |
||
| 10 | def test_from_db_value(): |
||
| 11 | """Tests whether the :see:from_db_value function |
||
| 12 | produces the expected :see:LocalizedValue.""" |
||
| 13 | |||
| 14 | input_data = get_init_integer_values() |
||
| 15 | localized_value = LocalizedField().from_db_value(input_data) |
||
| 16 | |||
| 17 | for lang_code, _ in settings.LANGUAGES: |
||
| 18 | assert getattr(localized_value, lang_code) == input_data[lang_code] |
||
| 19 | assert type((getattr(localized_value, lang_code))) == int |
||
| 20 |
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.