コード例 #1
0
def submit_form(id, email, name, reason, instructor, description, file_key,
                requestType):
    #If the request is via email we don't store any files
    if requestType == "email":
        request = Request(uuid=id,
                          email=email,
                          name=name,
                          reason=reason,
                          instructor=instructor,
                          description=description,
                          file_key=file_key,
                          status="Awaiting Review")
    #If it's a standard request store the file too
    else:
        request = Request(uuid=id,
                          email=email,
                          name=name,
                          reason=reason,
                          instructor=instructor,
                          description=description,
                          status="Awaiting Review")

    return request.put()
コード例 #2
0
 def put(id, status):
     request.put(
         'https://localhost:6300/projects/{0}/calculation'.format(id),
         json={"status": status})
コード例 #3
0
def test_4_update_existing_recipe(self):
    id: 1002
    r = request.put(self._get_url_withid("edit_recipe", id),
                    obj=APITest.NEW_RECIPE_OBJ)
    self.assertEqual(r.status_code, 204)  # no content
コード例 #4
0
def test_4_update_existing_category(self):
    id = 402
    r = request.put(self._get_url_withid('/edit_category', id),
                    obj=APITest.NEW_CATEGORY_OBJ)
    self.assertEqual(r.status_code, 204)  # no content
コード例 #5
0
ファイル: base.py プロジェクト: vsmetansky/py_web_app
 def put(self, id_):
     res = request.put(f'{self.api_url}/{id_}', data=request.form)
     return self.get()