def test_gif(): server = limbo.FakeServer() with vcr.use_cassette('test/fixtures/gif_bananas.yaml'): on_message(msgobj(u"!gif bananas"), server) url = json.loads( server.slack.posted_messages[0][1]["attachments"])[0]['image_url'] assert url in bananas_gifs, "{0} not in {1}".format(url, bananas_gifs)
def test_unicode(): with vcr.use_cassette('test/fixtures/gif_unicode.yaml'): ret = on_message({"text": u"!gif Mötörhead"}, None)
def test_gif(): with vcr.use_cassette('test/fixtures/gif_bananas.yaml'): ret = on_message({"text": u"!gif bananas"}, None) assert ret in bananas_gifs, "{0} not in {1}".format(ret, bananas_gifs)
def test_unicode(): with vcr.use_cassette("test/fixtures/gif_unicode.yaml"): ret = on_message({"text": u"!gif Mötörhead"}, None)
def test_gif(): with vcr.use_cassette("test/fixtures/gif_bananas.yaml"): ret = on_message({"text": u"!gif bananas"}, None) assert ret in bananas_gifs
def test_unicode(): server = limbo.FakeServer() with vcr.use_cassette('test/fixtures/gif_unicode.yaml'): on_message(msgobj(u"!gif Mötörhead"), server)