File: fixtures.py

package info (click to toggle)
pyoctoprintapi 0.1.14-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 172 kB
  • sloc: python: 750; makefile: 6; sh: 5
file content (168 lines) | stat: -rw-r--r-- 3,505 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
"""Sample api calls for testing"""

TEST_JOB = """
{
   "job":{
      "estimatedPrintTime":null,
      "filament":{
         "length":null,
         "volume":null
      },
      "file":{
         "date":null,
         "name":null,
         "origin":null,
         "path":null,
         "size":null
      },
      "lastPrintTime":null,
      "user":null
   },
   "progress":{
      "completion":45.65,
      "filepos":null,
      "printTime":15432,
      "printTimeLeft":12354,
      "printTimeOrigin":null
   },
   "state":"Printing"
}"""

TEST_PRINTER = """
{
   "sd":{
      "ready":false
   },
   "state":{
      "flags":{
         "cancelling":false,
         "closedOrError":false,
         "error":false,
         "finishing":false,
         "operational":true,
         "paused":false,
         "pausing":false,
         "printing":false,
         "ready":true,
         "resuming":false,
         "sdReady":false
      },
      "text":"Operational"
   },
   "temperature":{
      "bed":{
         "actual":14.53,
         "offset":-5,
         "target":60
      },
      "tool0":{
         "actual":14.17,
         "offset":10,
         "target":200
      }
   }
}
"""

TEST_SERVER = """
{"safemode":"bad_file","version":"1.5.3"}
"""

TEST_SETTINGS_TRACKING = """
{
   "enabled":false,
   "events":{
      "commerror":true,
      "plugin":true,
      "pong":true,
      "printer":true,
      "printer_safety_check":true,
      "printjob":true,
      "slicing":true,
      "startup":true,
      "throttled":true,
      "update":true
   },
   "ping":null,
   "pong":86400,
   "server":null,
   "unique_id":"6c4fae84-4be3-4c4d-8fbd-de9d0c3e1fcb"
}
"""

TEST_SETTINGS_DISCOVERY = """
{
   "httpPassword":"password",
   "httpUsername":"username",
   "publicHost":"host",
   "publicPort":80,
   "upnpUuid":"436fc3ec-fc2e-4851-b289-eb17974aa706"
}
"""

TEST_SETTINGS_CAMERA = """
{
   "bitrate": "10000k",
   "cacheBuster": false,
   "ffmpegPath": "/usr/bin/ffmpeg",
   "ffmpegThreads": 1,
   "ffmpegVideoCodec": "libx264",
   "flipH": false,
   "flipV": false,
   "rotate90": false,
   "snapshotSslValidation": true,
   "snapshotTimeout": 5,
   "snapshotUrl": "http://127.0.0.1:8080/?action=snapshot",
   "streamRatio": "16:9",
   "streamTimeout": 5,
   "streamUrl": "/webcam/?action=stream",
   "timelapseEnabled": true,
   "watermark": true,
   "webcamEnabled": true
}
"""

TEST_SETTINGS_CAMERA_1 = """
{
   "bitrate": "10000k",
   "cacheBuster": false,
   "ffmpegPath": "/usr/bin/ffmpeg",
   "ffmpegThreads": 1,
   "ffmpegVideoCodec": "libx264",
   "flipH": false,
   "flipV": false,
   "rotate90": false,
   "snapshotSslValidation": true,
   "snapshotTimeout": 5,
   "snapshotUrl": "http://127.0.0.1:8080/?action=snapshot",
   "streamRatio": "16:9",
   "streamTimeout": 5,
   "streamUrl": "http://127.0.0.1:8000/webcam/?action=stream",
   "timelapseEnabled": true,
   "watermark": true,
   "webcamEnabled": true
}
"""

# go2rtc style
TEST_SETTINGS_CAMERA_2 = """
{
   "bitrate": "10000k",
   "cacheBuster": false,
   "ffmpegPath": "/usr/bin/ffmpeg",
   "ffmpegThreads": 1,
   "ffmpegVideoCodec": "libx264",
   "flipH": false,
   "flipV": false,
   "rotate90": false,
   "snapshotSslValidation": true,
   "snapshotTimeout": 5,
   "snapshotUrl": "http://127.0.0.1:1984/api/frame.jpeg?src=streamname",
   "streamRatio": "16:9",
   "streamTimeout": 5,
   "streamUrl": "webrtc://127.0.0.1:1984/api/webrtc?src=streamname",
   "timelapseEnabled": true,
   "watermark": true,
   "webcamEnabled": true
}
"""