Ejemplo n.º 1
0
def test_set_date_taken():
    temporary_folder, folder = helper.create_working_folder()

    origin = '%s/audio.m4a' % folder
    shutil.copyfile(helper.get_file('audio.m4a'), origin)

    audio = Audio(origin)
    status = audio.set_date_taken(datetime.datetime(2013, 9, 30, 7, 6, 5))

    assert status == True, status

    audio_new = Audio(origin)
    metadata = audio_new.get_metadata()

    date_taken = metadata['date_taken']

    shutil.rmtree(folder)

    assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273, 0), metadata['date_taken']
Ejemplo n.º 2
0
def test_set_date_taken():
    temporary_folder, folder = helper.create_working_folder()

    origin = '%s/audio.m4a' % folder
    shutil.copyfile(helper.get_file('audio.m4a'), origin)

    audio = Audio(origin)
    status = audio.set_date_taken(datetime.datetime(2013, 9, 30, 7, 6, 5))

    assert status == True, status

    audio_new = Audio(origin)
    metadata = audio_new.get_metadata()

    date_taken = metadata['date_taken']

    shutil.rmtree(folder)

    assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273,
                          0), metadata['date_taken']
Ejemplo n.º 3
0
def test_set_date_taken():
    if not can_edit_exif():
        raise SkipTest('avmetareadwrite executable not found')

    temporary_folder, folder = helper.create_working_folder()

    origin = '%s/audio.m4a' % folder
    shutil.copyfile(helper.get_file('audio.m4a'), origin)

    audio = Audio(origin)
    status = audio.set_date_taken(datetime.datetime(2013, 9, 30, 7, 6, 5))

    assert status == True, status

    audio_new = Audio(origin)
    metadata = audio_new.get_metadata()

    date_taken = metadata['date_taken']

    shutil.rmtree(folder)

    assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273, 0), metadata['date_taken']
Ejemplo n.º 4
0
def test_set_date_taken():
    if not can_edit_exif():
        raise SkipTest('avmetareadwrite executable not found')

    temporary_folder, folder = helper.create_working_folder()

    origin = '%s/audio.m4a' % folder
    shutil.copyfile(helper.get_file('audio.m4a'), origin)

    audio = Audio(origin)
    status = audio.set_date_taken(datetime.datetime(2013, 9, 30, 7, 6, 5))

    assert status == True, status

    audio_new = Audio(origin)
    metadata = audio_new.get_metadata()

    date_taken = metadata['date_taken']

    shutil.rmtree(folder)

    assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273,
                          0), metadata['date_taken']