Files
gpt-engineer/tests/test_db.py
2023-05-06 20:11:17 +02:00

15 lines
327 B
Python

from ..db import DB
def test_db():
# use /tmp for testing
db = DB('/tmp/test_db')
db['test'] = 'test'
assert db['test'] == 'test'
db['test'] = 'test2'
assert db['test'] == 'test2'
db['test2'] = 'test2'
assert db['test2'] == 'test2'
assert db['test'] == 'test2'
print('test_db passed')