def test_load_directionals_no_space_end_of_line(self):
        temp_dir = Path(tempfile.mkdtemp())
        temp_file = Path(temp_dir, 'test.txt')
        temp_file.write_file('Northeast NE\n')

        Directional.load_directionals(temp_file.absolute())

        temp_dir.rmtree()

        self.assertEqual('Northeast', Directional.objects.first().direction)
        self.assertEqual('NE', Directional.objects.first().abbreviation)
    def handle(self, *args, **options):
        directionals_path = Path(self.BASE_DIR, 'directionals.txt')
        if directionals_path.exists():
            Directional.load_directionals(directionals_path)

        states_path = Path(self.BASE_DIR, 'states.txt')
        if states_path.exists():
            State.load_states(states_path)

        street_types_path = Path(self.BASE_DIR, 'street_types.txt')
        if street_types_path.exists():
            StreetType.load_street_types(street_types_path)