본문 바로가기 메뉴 바로가기

추측보다는 측정

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

추측보다는 측정

검색하기 폼
  • 분류 전체보기 (185)
    • 알고리즘 (56)
      • 백준 (36)
      • 프로그래머스 (20)
    • 세팅 (3)
    • JVM (45)
      • Spring (18)
      • JAVA (18)
      • Kotlin (1)
      • Jenkins (2)
    • 파이썬 (33)
      • DRF API Guide (2)
      • 장고 (19)
      • fast api (1)
    • 회고록 (9)
      • 가이드 (3)
    • 데이터베이스 (12)
      • Postgresql (11)
      • mysql (0)
    • devOps (5)
      • docker (5)
    • knowledge (18)
      • server (1)
      • linux (2)
      • pattern (9)
      • 운영체제 (1)
    • 컨퍼런스 (0)
  • 방명록

TestCase (2)
django testcase user create

self.user = User.objects.create(id="12", email="12@kakao.com", username="test") self.user.set_password("django_kakao_test") self.user.is_staff = True self.user.save() 일반적인 유저 생성이라 비슷하다.

파이썬/장고 2021. 7. 9. 12:17
DRF Testcase headers 처리

def test_report_create(self): print("test_report_create") access_token = self.common_report_create({"email": "12@kakao.com", "password": "django_kakao_test"}) response = RequestsClient().post('http://127.0.0.1:8000/api/report', data={'title': 'hi', 'content': 'hello'}, headers={'Authorization': access_token}) self.assertEqual(response.status_code, 200) response = self.client.post(url, data={'con..

파이썬/장고 2021. 7. 9. 12:16
이전 1 다음
이전 다음
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Java
  • docker-compose
  • Pattern
  • PostgreSQL
  • setattr
  • 자바
  • 그래프
  • 2021 KAKAO BLIND RECRUITMENT
  • 면접
  • Command Line
  • 프로그래머스
  • 파이썬
  • 카카오
  • Collections
  • BFS
  • env
  • docker
  • django
  • 알고리즘
  • DRF
  • thread
  • Celery
  • headers
  • Linux
  • Spring
  • dockerignore
  • 백준
  • postgres
  • Python
  • ubuntu
more
«   2025/09   »
일 월 화 수 목 금 토
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바