Example #1
0
def test_apple():
    with vcr.use_cassette('test/fixtures/stock_apple.yaml'):
        ret = on_message({"text": u"$aapl"}, None)
        assert ':chart_with_upwards_trend:' in ret
        assert 'Apple Inc.' in ret
        assert '130.41' in ret
        assert '+1.62' in ret
Example #2
0
def test_apple():
    with vcr.use_cassette('test/fixtures/stock_apple.yaml'):
        ret = on_message({"text": u"$aapl"}, None)
        assert ':chart_with_upwards_trend:' in ret
        assert 'Apple Inc.' in ret
        assert '130.41' in ret
        assert '+1.62' in ret
Example #3
0
def test_price():
    with vcr.use_cassette('test/fixtures/stock_none'):
        ret = on_message({"text": u"the price is $12.43"}, None)
        eq_(ret, None)
Example #4
0
def test_multiple():
    with vcr.use_cassette('test/fixtures/stock_multiple.yaml'):
        ret = on_message({"text": u"$goog $aapl"}, None)
        assert 'Google Inc' in ret
Example #5
0
def test_unicode():
    with vcr.use_cassette('test/fixtures/stock_unicode.yaml'):
        ret = on_message({"text": u"$äapl"}, None)
        eq_(ret, None)
Example #6
0
def test_nonexistent():
    with vcr.use_cassette('test/fixtures/stock_none'):
        ret = on_message({"text": u"bana"}, None)
        eq_(ret, None)
Example #7
0
def test_price():
    with vcr.use_cassette('test/fixtures/stock_none'):
        ret = on_message({"text": u"the price is $12.43"}, None)
        eq_(ret, None)
Example #8
0
def test_multiple():
    with vcr.use_cassette('test/fixtures/stock_multiple.yaml'):
        ret = on_message({"text": u"$goog $aapl"}, None)
        assert 'Google Inc' in ret
Example #9
0
def test_unicode():
    with vcr.use_cassette('test/fixtures/stock_unicode.yaml'):
        ret = on_message({"text": u"$äapl"}, None)
        eq_(ret, None)
Example #10
0
def test_nonexistent():
    with vcr.use_cassette('test/fixtures/stock_none'):
        ret = on_message({"text": u"bana"}, None)
        eq_(ret, None)