File size: 355 Bytes
21a9138
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Inert test fixture for behaviour extraction. Never executed; hosts use the reserved .invalid TLD.
import requests
import urllib.request

API = "https://api.example.invalid/v1/items"


def push(payload):
    return requests.post(API, json=payload, timeout=5)


def pull(url):
    with urllib.request.urlopen(url, timeout=5) as r:
        return r.read()