mirror of
				https://github.com/SectorLabs/django-localized-fields.git
				synced 2025-10-31 02:48:56 +03:00 
			
		
		
		
	Implement review suggestions
This commit is contained in:
		| @@ -187,15 +187,13 @@ class LocalizedFieldTestCase(TestCase): | |||||||
|         for lang_code, _ in settings.LANGUAGES: |         for lang_code, _ in settings.LANGUAGES: | ||||||
|             assert localized_value.get(lang_code) is None |             assert localized_value.get(lang_code) is None | ||||||
|  |  | ||||||
|     @staticmethod |     def test_from_db_value_none_return_none(self): | ||||||
|     def test_from_db_value_none_return_none(): |  | ||||||
|         """Tests whether the :see:from_db_value function |         """Tests whether the :see:from_db_value function | ||||||
|         correctly handles None values when LOCALIZED_FIELDS_EXPERIMENTAL |         correctly handles None values when LOCALIZED_FIELDS_EXPERIMENTAL | ||||||
|         is set to True.""" |         is set to True.""" | ||||||
|  |  | ||||||
|         settings.LOCALIZED_FIELDS_EXPERIMENTAL = True |         with self.settings(LOCALIZED_FIELDS_EXPERIMENTAL=True): | ||||||
|             localized_value = LocalizedField.from_db_value(None) |             localized_value = LocalizedField.from_db_value(None) | ||||||
|         settings.LOCALIZED_FIELDS_EXPERIMENTAL = False |  | ||||||
|  |  | ||||||
|         assert localized_value is None |         assert localized_value is None | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user