def test_rename_tag_with_time(watson):
    """
    Renaming a tag should update the "last_updated" time on any frame that
    contains that tag.
    """
    watson.frames.add(
        'foo', 4001, 4002, ['some_tag'],
        id='c76d1ad0282c429595cc566d7098c165', updated_at=4005
    )
    watson.frames.add(
        'bar', 4010, 4015, ['other_tag'],
        id='eed598ff363d42658a095ae6c3ae1088', updated_at=4035
    )

    watson.rename_tag("other_tag", "baz")

    assert len(watson.frames) == 2

    assert watson.frames[0].id == 'c76d1ad0282c429595cc566d7098c165'
    assert watson.frames[0].project == 'foo'
    assert watson.frames[0].start.int_timestamp == 4001
    assert watson.frames[0].stop.int_timestamp == 4002
    assert watson.frames[0].tags == ['some_tag']
    assert watson.frames[0].updated_at.int_timestamp == 4005

    assert watson.frames[1].id == 'eed598ff363d42658a095ae6c3ae1088'
    assert watson.frames[1].project == 'bar'
    assert watson.frames[1].start.int_timestamp == 4010
    assert watson.frames[1].stop.int_timestamp == 4015
    assert watson.frames[1].tags == ['baz']
    # assert watson.frames[1].updated_at.int_timestamp == 9000
    assert watson.frames[1].updated_at.int_timestamp > 4035

    Renaming a tag should update the "last_updated" time on any frame that
    contains that tag.
    
tests/test_watson.py