Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:attendee-app-unit-test #1142

Closed
Ritabear opened this issue May 25, 2023 · 1 comment
Closed

feat:attendee-app-unit-test #1142

Ritabear opened this issue May 25, 2023 · 1 comment
Assignees

Comments

@Ritabear
Copy link
Contributor

https://discord.com/channels/752904426057892052/1041070387909378190

#### 目標 API 
<django>/api/attendee/verify/
#### 需求
- <nuxt>/ext/live?token=<token> 會順便用 token POST 目標 API
- <nuxt>/ext/discord?token=<token> 會順便用 token POST 目標 API
#### 分析
- 目標 API 的 Input 需有 CONFERENCE_DEFAULT_SLUG, reg, Attendee 的 token
    - CONFERENCE_DEFAULT_SLUG
        - 格式為 e.g. "pycontw-2023"
    - reg = 單或多個 registry's Entry
        - // Entry 的 CRUD 在 <django>/admin/registry/entry/
        - Entry 需有 key, value
        - Entry 格式為 e.g. key = "pycontw-2023.live.r0", value = video_id
    - Attendee 的 token
        - // Attendee 的 CRUD 在 <django>/admin/attendee/attendee
        - Attendee 需有 token
- 目標 API 的 Output 需有 room 和 video_id
    - room = room_name
        - 格式為 e.g. "r0"
        - 需用 CONFERENCE_DEFAULT_SLUG 搭配 reg 的 key 產出
    - video_id = Entry's value
        - 格式需使 https://www.youtube.com/embed/<video_id> 合法

對於Unit Testing,目前初步計畫上述裡,有"格式","需有","需用"的句子都各別至少1個Test Case。

Ref:

  1. https://github.com/pycontw/pycon.tw/tree/master/src/attendee
  2. https://github.com/pycontw/pycon.tw/blob/master/src/pycontw2016/settings/base.py
  3. https://github.com/yychen/dj-registry
  4. https://github.com/pycontw/pycontw-frontend/blob/3e1de18b38b6767494778cd9c9e0722158ff3005/store/index.js
@Ritabear Ritabear self-assigned this May 25, 2023
@Ritabear Ritabear changed the title attendee app unit test feat:attendee-app-unit-test May 25, 2023
@josix
Copy link
Collaborator

josix commented Mar 16, 2024

Resolved by #1146

@josix josix closed this as completed Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants