Simulate graph states in the browser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
484B

  1. """
  2. Makes a dummy post to the test server
  3. """
  4. import requests
  5. import json
  6. import abp
  7. #URL = "http://localhost:5000"
  8. URL = "https://abv.peteshadbolt.co.uk/"
  9. def test_graph():
  10. N = 100
  11. g = abp.NXGraphState(range(N))
  12. for i in range(N-1):
  13. g.act_cz(i, i+1)
  14. g.layout()
  15. return g
  16. if __name__ == '__main__':
  17. data = json.dumps(test_graph().to_json(stringify=False))
  18. r = requests.post("{}/graph".format(URL), data=data)
  19. print r.status_code, r.content