|
@@ 286-300 (lines=15) @@
|
| 283 |
|
|
| 284 |
|
assert dest_path is None, dest_path |
| 285 |
|
|
| 286 |
|
def test_import_destination_in_source_gh_287(): |
| 287 |
|
temporary_folder, folder = helper.create_working_folder() |
| 288 |
|
folder_destination = '{}-destination'.format(folder) |
| 289 |
|
os.mkdir(folder_destination) |
| 290 |
|
|
| 291 |
|
origin = '%s/video.mov' % folder |
| 292 |
|
shutil.copyfile(helper.get_file('video.mov'), origin) |
| 293 |
|
|
| 294 |
|
helper.reset_dbs() |
| 295 |
|
dest_path = elodie.import_file(origin, folder_destination, False, False, False) |
| 296 |
|
helper.restore_dbs() |
| 297 |
|
|
| 298 |
|
shutil.rmtree(folder) |
| 299 |
|
|
| 300 |
|
assert dest_path is not None, dest_path |
| 301 |
|
|
| 302 |
|
def test_import_invalid_file_exit_code(): |
| 303 |
|
temporary_folder, folder = helper.create_working_folder() |
|
@@ 270-284 (lines=15) @@
|
| 267 |
|
|
| 268 |
|
assert '2015-12/Unknown Location/2015-12-05_00-59-26-plain.jpg' in dest_path, dest_path |
| 269 |
|
|
| 270 |
|
def test_import_destination_in_source(): |
| 271 |
|
temporary_folder, folder = helper.create_working_folder() |
| 272 |
|
folder_destination = '{}/destination'.format(folder) |
| 273 |
|
os.mkdir(folder_destination) |
| 274 |
|
|
| 275 |
|
origin = '%s/plain.jpg' % folder |
| 276 |
|
shutil.copyfile(helper.get_file('plain.jpg'), origin) |
| 277 |
|
|
| 278 |
|
helper.reset_dbs() |
| 279 |
|
dest_path = elodie.import_file(origin, folder_destination, False, False, False) |
| 280 |
|
helper.restore_dbs() |
| 281 |
|
|
| 282 |
|
shutil.rmtree(folder) |
| 283 |
|
|
| 284 |
|
assert dest_path is None, dest_path |
| 285 |
|
|
| 286 |
|
def test_import_destination_in_source_gh_287(): |
| 287 |
|
temporary_folder, folder = helper.create_working_folder() |