Skip to content

Commit

Permalink
Merge pull request #85 from yahoo/patch_test_fix
Browse files Browse the repository at this point in the history
Fix duplicate test
  • Loading branch information
dwighthubbard committed Sep 25, 2015
2 parents 1a4aada + 24c54b3 commit 8130242
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 8130242

Please sign in to comment.