1# This example code is in the Public Domain (or CC0 licensed, at your option.)
2
3# Unless required by applicable law or agreed to in writing, this
4# software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
5# CONDITIONS OF ANY KIND, either express or implied.
6
7# -*- coding: utf-8 -*-
8
9from __future__ import print_function, unicode_literals
10
11import re
12
13import ttfw_idf
14
15
16@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
17def test_examples_protocol_socket_non_block(env, _):
18    dut = env.get_dut('non_blocking_socket', 'examples/protocols/sockets/non_blocking', dut_class=ttfw_idf.ESP32DUT)
19
20    # start the test and expect the client to receive back it's original data
21    dut.start_app()
22    dut.expect(re.compile(r'nonblocking-socket-client: Received: GET / HTTP/1.1'), timeout=30)
23
24
25if __name__ == '__main__':
26    test_examples_protocol_socket_non_block()
27