Closed choppaluv closed 6 years ago
각각의 view(list, detail, list for each trip) 에 대해 Restful API django testing을 하였습니다.
list view (/api/\<models>/) 의 경우 GET과 POST가 잘 이루어지는지 확인하였습니다.
detail view (/api/\<models>/\<id>/)의 경우 GET, PUT, PATCH, DELETE가 잘 이루어지는지 확인하였습니다. PUT과 PATCH의 경우 각 모델의 필드별로 PUT, PATCH가 잘 이루어짐을 확인하였습니다. 또한 backend view에 의해 date가 valid하지 않은 경우(sinceWhen > tilWhen) 400 Response가 오는 것을 확인하였습니다.
list for each trip(/api/\<models>/trip/\<tripID>/) view에 대해서는 GET이 잘 이루어짐을 확인하였습니다.
테스팅 결과는 아래 사진과 같습니다. (pass 105/ total 105)
Backend testing for Model & View
model, view에 대한 기본적인 django testing을 완료하였습니다. 지금까지 작성한 test에 의한 결과는 아래 사진과 같습니다.
앞으로 더 작성해야할 test 사항들은 다음과 같습니다.
user model에 있는 create_auth_token method에 대한 testGET을 제외한 다른 Restful api(POST, PUT, PATCH, DELETE) 에 대한 test