learningmaterial_test.py 313 B

123456789101112131415
  1. import pytest
  2. import requests
  3. import json
  4. OK = 200
  5. CREATED = 201
  6. NOT_FOUND = 404
  7. NOT_ACCEPTABLE = 406
  8. CONFLICT = 409
  9. from constants import WEBSITE_PREFIX
  10. def add_comment(materialId, commentBody):
  11. url = WEBSITE_PREFIX + '/materials/' + materialId + '/comment'
  12. return requests.post(url, json=commentBody)