Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 5
0
def test_unicode():
    with vcr.use_cassette('test/fixtures/stock_unicode.yaml'):
        ret = on_message({"text": u"$äapl"}, None)
        eq_(ret, None)
Exemplo n.º 6
0
def test_nonexistent():
    with vcr.use_cassette('test/fixtures/stock_none'):
        ret = on_message({"text": u"bana"}, None)
        eq_(ret, None)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 9
0
def test_unicode():
    with vcr.use_cassette('test/fixtures/stock_unicode.yaml'):
        ret = on_message({"text": u"$äapl"}, None)
        eq_(ret, None)
Exemplo n.º 10
0
def test_nonexistent():
    with vcr.use_cassette('test/fixtures/stock_none'):
        ret = on_message({"text": u"bana"}, None)
        eq_(ret, None)