示例#1
0
def test_get_tags():
    tags = mpsinfo.get_tags(common.TESTS, os.path.join(common.TESTS, "foo", "bar", "baz.jpg"))
    assert tags["basename"] == "baz.jpg"
    assert tags["location"] == "foo/bar"
    assert len(tags["tags"]) == 2
    assert u"foo" in tags["tags"]
    assert u"bar" in tags["tags"]
示例#2
0
def test_get_tags():
    tags = mpsinfo.get_tags(
        common.TESTS, os.path.join(common.TESTS, 'foo', 'bar', 'baz.jpg'))
    assert tags['basename'] == 'baz.jpg'
    assert tags['location'] == 'foo/bar'
    assert len(tags['tags']) == 2
    assert u'foo' in tags['tags']
    assert u'bar' in tags['tags']
示例#3
0
def test_get_tags_error_handling():
    with pytest.raises(exceptions.AssertionError):
        mpsinfo.get_tags(os.path.join(common.TESTS, 'foo'),
                         os.path.join(common.TESTS, 'bar'))
示例#4
0
def test_get_tags_error_handling():
    with pytest.raises(exceptions.AssertionError):
        mpsinfo.get_tags(os.path.join(common.TESTS, "foo"), os.path.join(common.TESTS, "bar"))