@@ -0,0 +1,1138 @@
+# -*- coding: utf-8 -*-%0Afrom django.test import TestCase%0Afrom django.core.management import call_command%0Afrom django.core.management.base import CommandError%0A%0Afrom .model_factories import AttributeF, DomainSpecification3AF%0A%0Afrom ..models import Locality, Value%0A%0A%0Aclass TestManagementCommands(TestCase):%0A    def test_import_csv(self):%0A%0A        attr1 = AttributeF.create(key='name')%0A        attr2 = AttributeF.create(key='url')%0A        attr3 = AttributeF.create(key='services')%0A%0A        DomainSpecification3AF.create(%0A            name='Test', spec1__attribute=attr1, spec2__attribute=attr2,%0A            spec3__attribute=attr3%0A        )%0A%0A        call_command(%0A            'import_csv', 'Test', 'test_imp',%0A            './localities/tests/test_data/test_csv_import_ok.tsv',%0A            './localities/tests/test_data/test_csv_import_map.json',%0A            use_tabs=True%0A        )%0A%0A        self.assertEqual(Locality.objects.count(), 3)%0A        self.assertEqual(Value.objects.count(), 8)%0A%0A    def test_import_csv_bad_arguments(self):%0A%0A        self.assertRaises(%0A            CommandError, call_command, 'import_csv', 'Test', 'test_imp'%0A        )%0A

Add tests for Locality management commands