def test_esme_init_with_simple_keyvaluestore(self): key_value_store = KeyValueStore() self.esme = ESME(None, key_value_store, None) kvstc = KeyValueStoreTestCase() kvstc.prefix = __name__ kvstc.run_all_tests_on_instance(self.esme.kvs) self.assertTrue(key_value_store.is_empty())
def test_esme_init_with_bad_object(self): key_value_store = self self.esme = ESME(None, key_value_store, None) kvstc = KeyValueStoreTestCase() kvstc.prefix = __name__ exception_expected = None try: kvstc.run_all_tests_on_instance(self.esme.kvs) self.assertTrue(key_value_store.is_empty()) except Exception, e: exception_expected = e
def test_esme_init_with_fakeredis(self): fake_redis = FakeRedis() self.esme = ESME(None, fake_redis, None) kvstc = KeyValueStoreTestCase() kvstc.prefix = __name__ kvstc.run_all_tests_on_instance(self.esme.kvs)
def dont_test_esme_init_with_redis(self): r_server = redis.Redis("localhost", db=13) self.esme = ESME(None, r_server, None) kvstc = KeyValueStoreTestCase() kvstc.prefix = __name__ kvstc.run_all_tests_on_instance(self.esme.kvs)