Permalink
Browse files

check dbsize() instead of keys("*") in case of db with billions of keys

  • Loading branch information...
1 parent 8ce2b4b commit 85e1b30bcd525de0db856d25d9d95b49712ba294 @benwilber benwilber committed Jun 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/test_basic.py
View
@@ -10,7 +10,7 @@ def setup():
global t
db = 9
t = taxon.Taxon(Redis(db=db))
- if len(t.keys('*')) > 0:
+ if t.dbsize() > 0:
raise RuntimeError("Redis DB %d is not empty" % db)

0 comments on commit 85e1b30

Please sign in to comment.