def test_map_data(self):
        fake_import_file = ImportFile.objects.create(
            import_record=self.import_record,
            raw_save_done=True
        )
        fake_raw_bs = BuildingSnapshot.objects.create(
            import_file=fake_import_file,
            extra_data=self.fake_row,
            source_type=ASSESSED_RAW
        )

        util.make_fake_mappings(self.fake_mappings, self.fake_org)

        tasks.map_data(fake_import_file.pk)

        mapped_bs = list(BuildingSnapshot.objects.filter(
            import_file=fake_import_file,
            source_type=ASSESSED_BS,
        ))

        self.assertEqual(len(mapped_bs), 1)

        test_bs = mapped_bs[0]

        self.assertNotEqual(test_bs.pk, fake_raw_bs.pk)
        self.assertEqual(test_bs.property_name, self.fake_row['Name'])
        self.assertEqual(
            test_bs.address_line_1, self.fake_row['Address Line 1']
        )
        self.assertEqual(
            test_bs.year_built,
            parser.parse(self.fake_row['Year Built']).year
        )

        # Make sure that we saved the extra_data column mappings
        data_columns = Column.objects.filter(
            organization=test_bs.super_organization,
            is_extra_data=True
        )

        # There's only one peice of data that didn't cleanly map
        self.assertListEqual(
            sorted([d.column_name for d in data_columns]), ['Double Tester']
        )
Parse a human readable data size and return the number of bytes.
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/tests/test_tasks.py/TestTasks.test_map_data--crossover with--dataset/ETHPy150Open xolox/python-humanfriendly/humanfriendly/__init__.py/parse_size