create first fixture for gdbm

This commit is contained in:
Kelsey Hawley 2013-12-17 14:25:24 -08:00
parent 043771ab25
commit 2dd147c1c2

View File

@ -16,5 +16,12 @@ except:
import dumbdbm as dumb
from whichdb import whichdb
@pytest.fixture
def make_gdbm_test_db():
db_name ="test_gdbm"
print "creating", db_name
test_db = gdbm.open(db_name, "n")
test_db['very first key'] = 'very first value'
test_db['second key'] = 'second value'
test_db.close()
return db_name