Example #1
0
def add_ebm(dbpath):
    from db.xapian_music import add_tag
    from db.xapian_music import search

    q = 'artist:"VNV Nation"'
    tag = "ebm"
    add_tag(dbpath, q, tag)

    for song in search(dbpath, q):
        assert tag in song["data"]["tags"]
        assert len(search(dbpath, q)) == len(search(dbpath, "tag:%s" % tag))
Example #2
0
  def add_tags(db):
    q = 'artist:"VNV Nation"'
    tag = "ebm"
    add_tag(db, q, tag)
    
    for song in search(db, q):
      assert tag in song['data']['tags']

    print search(db, q)
    print search(db, "tag:ebm")
    assert len(search(db, q)) == len(search(db, "tag:%s" % tag))