File: record_mode.py

package info (click to toggle)
vcr.py 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,008 kB
  • sloc: python: 5,695; makefile: 179; sh: 1
file content (23 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from enum import Enum


class RecordMode(str, Enum):
    """
    Configures when VCR will record to the cassette.

    Can be declared by either using the enumerated value (`vcr.mode.ONCE`)
    or by simply using the defined string (`once`).

    `ALL`: Every request is recorded.
    `ANY`: ?
    `NEW_EPISODES`: Any request not found in the cassette is recorded.
    `NONE`: No requests are recorded.
    `ONCE`:  First set of requests is recorded, all others are replayed.
    Attempting to add a new episode fails.
    """

    ALL = "all"
    ANY = "any"
    NEW_EPISODES = "new_episodes"
    NONE = "none"
    ONCE = "once"