mirror of
https://github.com/simon987/hexlib.git
synced 2025-12-14 07:09:05 +00:00
Fix tests
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from hexlib.db import VolatileState, VolatileBooleanState, VolatileQueue
|
||||
from hexlib.env import get_redis
|
||||
|
||||
|
||||
class TestVolatileState(TestCase):
|
||||
|
||||
def setUp(self) -> None:
|
||||
rdb = get_redis()
|
||||
rdb.delete("test1a", "test1b", "test1c", "test1:a", "test2b")
|
||||
|
||||
def test_get_set(self):
|
||||
s = VolatileState(prefix="test1")
|
||||
val = {
|
||||
@@ -53,6 +58,10 @@ class TestVolatileState(TestCase):
|
||||
|
||||
class TestVolatileBoolState(TestCase):
|
||||
|
||||
def setUp(self) -> None:
|
||||
rdb = get_redis()
|
||||
rdb.delete("test1a", "test1b", "test1c", "test1:a", "test2b")
|
||||
|
||||
def test_get_set(self):
|
||||
s = VolatileBooleanState(prefix="test1")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user