From 23c46167114ead57e36b1bd7dcf2c30c1f03a744 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 18 Jan 2017 08:00:30 +0900 Subject: [PATCH] Fix testcase --- server/storage.py | 4 ++-- tests/test_util.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/storage.py b/server/storage.py index fedcfe3..074d8a3 100644 --- a/server/storage.py +++ b/server/storage.py @@ -10,11 +10,11 @@ import os from functools import partial -from lib.util import subclasses, increment_byte_string +import lib.util as util def db_class(name): '''Returns a DB engine class.''' - for db_class in subclasses(Storage): + for db_class in util.subclasses(Storage): if db_class.__name__.lower() == name.lower(): db_class.import_module() return db_class diff --git a/tests/test_util.py b/tests/test_util.py index a6b79ef..bb98c83 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -56,4 +56,4 @@ def test_chunks(): def test_increment_byte_string(): assert util.increment_byte_string(b'1') == b'2' assert util.increment_byte_string(b'\x01\x01') == b'\x01\x02' - assert util.increment_byte_string(b'\xff\xff') == b'\x01\x00\x00' + assert util.increment_byte_string(b'\xff\xff') == None