Skip to content

Commit

Permalink
Fix duplicate test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwight Hubbard committed Sep 25, 2015
1 parent 1a4aada commit 24c54b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,22 @@ def test_redislite_patch_redis_with_dbfile(self):
self.assertEqual(r.pid, s.pid)
redislite.patch.unpatch_redis()

def test_redislite_patch_redis_with_dbfile(self):
def test_redislite_patch_strictredis_with_dbfile(self):
dbfilename = 'test_redislite_patch_redis_with_short_dbfile.db'
if os.path.exists(dbfilename):
os.remove(dbfilename)
redislite.patch.patch_redis(dbfilename)
redislite.patch.patch_redis_StrictRedis(dbfilename)
import redis
r = redis.Redis()
r = redis.StrictRedis()
self._log_redis_pid(r)
self.assertIsInstance(r.pid, int) # Should have a redislite pid
s = redis.Redis()
s = redis.StrictRedis()
self._log_redis_pid(s)
self.assertIsInstance(r.pid, int) # Should have a redislite pid

# Both instances should be talking to the same redis server
self.assertEqual(r.pid, s.pid)
redislite.patch.unpatch_redis()
redislite.patch.unpatch_redis_StrictRedis()


if __name__ == '__main__':
Expand Down

0 comments on commit 24c54b3

Please sign in to comment.