FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
replicate-python/tests/test_model.py at main · yama3a/replicate-python · GitHub
yama3a
/
replicate-python
Public
forked from
replicate/replicate-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
replicate-python
/
tests
/
test_model.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (29 loc) · 916 Bytes
Breadcrumbs
replicate-python
/
tests
/
test_model.py
Copy path
File metadata and controls
35 lines (29 loc) · 916 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
responses
from
replicate
.
client
import
Client
@
responses
.
activate
def
test_versions
():
client
=
Client
(
api_token
=
"abc123"
)
model
=
client
.
models
.
get
(
"test/model"
)
responses
.
get
(
"https://api.replicate.com/v1/models/test/model/versions"
,
json
=
{
"results"
: [
{
"id"
:
"v1"
,
"created_at"
:
"2022-04-26T19:29:04.418669Z"
,
"cog_version"
:
"0.3.0"
,
"openapi_schema"
: {},
},
{
"id"
:
"v2"
,
"created_at"
:
"2022-03-21T13:01:04.418669Z"
,
"cog_version"
:
"0.3.0"
,
"openapi_schema"
: {},
},
]
},
)
versions
=
model
.
versions
.
list
()
assert
len
(
versions
)
==
2
assert
versions
[
0
].
id
==
"v1"
assert
versions
[
1
].
id
==
"v2"
Back
|
FazBrowse Home
|
New Git URL