molotov_scenarios.py [116:139]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        async with session.get(join(SERVER_URL, 'oopsie')) as resp:
            assert resp.status == 500

    @scenario(weight=1)
    async def scenario_orders_post_csv(session):
        customer_id = random.randint(1, 1000)
        lines = []
        for i in range(0, random.randint(1, 5)):
            lines.append(','.join(map(str, [
                random.randint(1, 6), random.randint(1, 4)
            ])))
        data = FormData()
        data.add_field('customer', str(customer_id))
        data.add_field(
            'file',
            io.BytesIO('\n'.join(lines).encode('utf8')),
            filename='data.csv',
            content_type='text/plain'
        )
        async with session.post(join(SERVER_URL, 'api', 'orders', 'csv'), data=data) as resp:
            assert resp.status == 200, resp.status


if SERVICE_NAME.startswith('opbeans-node'):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scenarios/molotov_scenarios.py [144:167]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        async with session.get(join(SERVER_URL, 'oopsie')) as resp:
            assert resp.status == 500

    @scenario(weight=1)
    async def scenario_orders_post_csv(session):
        customer_id = random.randint(1, 1000)
        lines = []
        for i in range(0, random.randint(1, 5)):
            lines.append(','.join(map(str, [
                random.randint(1, 6), random.randint(1, 4)
            ])))
        data = FormData()
        data.add_field('customer', str(customer_id))
        data.add_field(
            'file',
            io.BytesIO('\n'.join(lines).encode('utf8')),
            filename='data.csv',
            content_type='text/plain'
        )
        async with session.post(join(SERVER_URL, 'api', 'orders', 'csv'), data=data) as resp:
            assert resp.status == 200, resp.status


if SERVICE_NAME.startswith('opbeans-node'):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



