aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_everything.py
blob: 76ab889b7566856470e4f97a0d2b8414bfc15040 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from __future__ import print_function, unicode_literals

import glob
import json


def test_everything(realish_eventrouter, team):
    datafiles = glob.glob("_pytest/data/websocket/*.json")

    for fname in sorted(datafiles):
        data = json.loads(open(fname, "r").read())
        team.ws.add(data)
        realish_eventrouter.receive_ws_callback(team.team_hash, None)
        realish_eventrouter.handle_next()

    assert len(realish_eventrouter.queue) == 20