Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
431bc5a2
Commit
431bc5a2
authored
May 11, 2023
by
Aarni Koskela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindent utils_test with 4 spaces
parent
098d2fda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
42 deletions
+44
-42
test/basic_features/utils_test.py
test/basic_features/utils_test.py
+44
-42
No files found.
test/basic_features/utils_test.py
View file @
431bc5a2
import
unittest
import
unittest
import
requests
import
requests
class
UtilsTests
(
unittest
.
TestCase
):
class
UtilsTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
url_options
=
"http://localhost:7860/sdapi/v1/options"
self
.
url_options
=
"http://localhost:7860/sdapi/v1/options"
...
@@ -23,7 +24,7 @@ class UtilsTests(unittest.TestCase):
...
@@ -23,7 +24,7 @@ class UtilsTests(unittest.TestCase):
pre_value
=
response
.
json
()[
"send_seed"
]
pre_value
=
response
.
json
()[
"send_seed"
]
self
.
assertEqual
(
requests
.
post
(
self
.
url_options
,
json
=
{
"send_seed"
:
not
pre_value
})
.
status_code
,
200
)
self
.
assertEqual
(
requests
.
post
(
self
.
url_options
,
json
=
{
"send_seed"
:
not
pre_value
})
.
status_code
,
200
)
response
=
requests
.
get
(
self
.
url_options
)
response
=
requests
.
get
(
self
.
url_options
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
...
@@ -58,5 +59,6 @@ class UtilsTests(unittest.TestCase):
...
@@ -58,5 +59,6 @@ class UtilsTests(unittest.TestCase):
def
test_embeddings
(
self
):
def
test_embeddings
(
self
):
self
.
assertEqual
(
requests
.
get
(
self
.
url_embeddings
)
.
status_code
,
200
)
self
.
assertEqual
(
requests
.
get
(
self
.
url_embeddings
)
.
status_code
,
200
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment