Skip to content

Commit

Permalink
fix filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed May 28, 2020
1 parent de6f9ca commit 49fe166
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions qfieldsync/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,20 @@ def test_copy(self):
self.assertIn('spatialite.db', files)

dcim_folder = os.path.join(export_folder, "DCIM")
self.assertIn('qfield_photo_1.jpg', dcim_folder)
self.assertIn('qfield_photo_2.jpg', dcim_folder)
self.assertIn('qfield_photo_3.jpg', dcim_folder)
dcim_files = os.listdir(dcim_folder)
self.assertIn('qfield-photo_1.jpg', dcim_files)
self.assertIn('qfield-photo_2.jpg', dcim_files)
self.assertIn('qfield-photo_3.jpg', dcim_files)
dcim_subfolder = os.path.join(dcim_folder, "subfolder")
self.assertIn('qfield_photo_sub_1.jpg', dcim_subfolder)
self.assertIn('qfield_photo_sub_2.jpg', dcim_subfolder)
self.assertIn('qfield_photo_sub_3.jpg', dcim_subfolder)
dcim_subfiles = os.listdir(dcim_subfolder)
self.assertIn('qfield-photo_sub_1.jpg', dcim_subfiles)
self.assertIn('qfield-photo_sub_2.jpg', dcim_subfiles)
self.assertIn('qfield-photo_sub_3.jpg', dcim_subfiles)

shutil.rmtree(export_folder)
shutil.rmtree(source_folder)

def load_project(self, path):
project = QgsProject.instance()
self.assertTrue(project.read(path))
return project
return project

0 comments on commit 49fe166

Please sign in to comment.