def test_create_channel(self): conn = Nsqd('127.0.0.1', 4151, loop=self.loop) res = yield from conn.create_topic('zap') self.assertEqual('', res) res = yield from conn.create_channel('zap', 'bar') self.assertEqual('', res)
def test_delete_topic(self): conn = Nsqd('127.0.0.1', 4151, loop=self.loop) res = yield from conn.delete_topic('foo2') self.assertEqual('', res)
def test_stats(self): conn = Nsqd('127.0.0.1', 4151, loop=self.loop) res = yield from conn.stats() self.assertIn('version', res)
def test_mpub(self): conn = Nsqd('127.0.0.1', 4151, loop=self.loop) res = yield from conn.mpub('baz', 'baz_msg:1', 'baz_msg:1') self.assertEqual('OK', res)
def test_ok(self): conn = Nsqd('127.0.0.1', 4151, loop=self.loop) res = yield from conn.ping() self.assertEqual(res, 'OK')