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()
def put(id, status): request.put( 'https://localhost:6300/projects/{0}/calculation'.format(id), json={"status": status})
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
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
def put(self, id_): res = request.put(f'{self.api_url}/{id_}', data=request.form) return self.get()