def test_process_same_date_different_files_rename(mocker):
    shutil.rmtree('output', ignore_errors=True)
    mocker.patch.object(Phockup, 'check_directories')
    mocker.patch.object(Phockup, 'walk_directory')
    phockup = Phockup('input', 'output')
    phockup.process_file('input/exif.jpg')
    mocker.patch.object(Exif, 'data')
    Exif.data.return_value = {'MIMEType': 'image/jpeg', 'CreateDate': '2017:01:01 01:01:01'}
    phockup.process_file('input/date_20170101_010101.jpg')
    assert os.path.isfile('output/2017/01/01/20170101-010101-2.jpg')
    shutil.rmtree('output', ignore_errors=True)
def test_process_same_date_different_files_rename(mocker):
    shutil.rmtree('output', ignore_errors=True)
    mocker.patch.object(Phockup, 'check_directories')
    mocker.patch.object(Phockup, 'walk_directory')
    phockup = Phockup('input', 'output')
    phockup.process_file('input/exif.jpg')
    mocker.patch.object(Exif, 'data')
    Exif.data.return_value = {'MIMEType': 'image/jpeg', 'CreateDate': '2017:01:01 01:01:01'}
    phockup.process_file('input/date_20170101_010101.jpg')
    assert os.path.isfile('output/2017/01/01/20170101-010101-2.jpg')
    shutil.rmtree('output', ignore_errors=True)