|
12345678910111213141516171819202122232425262728 |
- """
- Makes a dummy post to the test server
- """
- import requests
- import json
- import abp
- import random
- import time
-
- #URL = "http://localhost:5000"
- URL = "https://abv.peteshadbolt.co.uk/"
-
- def test_graph():
- N = 50
- g = abp.NXGraphState(range(N))
-
- for i in range(N):
- g.act_cz(random.randint(0, N-1), random.randint(0, N-1))
-
- g.layout()
- return g
-
- if __name__ == '__main__':
- while True:
- data = json.dumps(test_graph().to_json(stringify=False))
- r = requests.post("{}/graph".format(URL), data=data)
- time.sleep(5)
-
|