def test_datagram_request(self):
        """Test to ensure requesting data from a socket service works as expected"""
        packet = struct.pack("!HHHHHH", 0x0001, 0x0100, 1, 0, 0, 0)
        for name in ('www', 'google', 'com'):
            header = b"!b"
            header += bytes(str(len(name)), "utf-8") + b"s"
            query = struct.pack(header, len(name), name.encode('utf-8'))
            packet = packet + query

        dns_query = packet + struct.pack("!bHH", 0, 1, 1)
        assert 0 > len(self.udp_service.request(dns_query.decode("utf-8"), buffer_size=4096).data.read())
dataset/ETHPy150Open timothycrosley/hug/tests/test_use.py/TestSocket.test_datagram_request/swapped operands of `>`