Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
4fd3df8d
Commit
4fd3df8d
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
More logging messages
parent
de31170f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
run_tests.py
+11
-1
11 additions, 1 deletion
run_tests.py
src/cutecoin/tests/process_cfg_community/test_add_community.py
+6
-4
6 additions, 4 deletions
...utecoin/tests/process_cfg_community/test_add_community.py
with
17 additions
and
5 deletions
run_tests.py
+
11
−
1
View file @
4fd3df8d
import
sys
import
os
import
signal
import
unittest
import
subprocess
import
time
...
...
@@ -16,5 +17,14 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
print
(
"
Run
"
)
runner
=
unittest
.
TextTestRunner
().
run
(
unittest
.
defaultTestLoader
.
discover
(
start_dir
=
'
cutecoin.tests
'
,
pattern
=
'
test_*
'
))
print
(
"
Terminate
"
)
p
.
terminate
()
os
.
kill
(
p
.
pid
,
signal
.
SIGINT
)
time
.
sleep
(
2
)
try
:
os
.
kill
(
p
.
pid
,
signal
.
SIGKILL
)
p
.
kill
()
print
(
"
Hard killed
"
)
except
OSError
:
print
(
"
Terminated gracefully
"
)
sys
.
exit
(
not
runner
.
wasSuccessful
())
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/cutecoin/tests/process_cfg_community/test_add_community.py
+
6
−
4
View file @
4fd3df8d
import
sys
import
unittest
import
os
import
asyncio
import
quamash
import
logging
import
time
from
PyQt5.QtWidgets
import
QDialog
from
PyQt5.QtCore
import
QLocale
,
Qt
from
PyQt5.QtTest
import
QTest
...
...
@@ -17,6 +15,7 @@ from cutecoin.core.app import Application
from
cutecoin.core.account
import
Account
from
cutecoin.tests
import
get_application
class
ProcessAddCommunity
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
qapplication
=
get_application
()
...
...
@@ -62,7 +61,8 @@ class ProcessAddCommunity(unittest.TestCase):
QTest
.
mouseDClick
(
process_community
.
spinbox_port
,
Qt
.
LeftButton
)
process_community
.
spinbox_port
.
setValue
(
50000
)
self
.
assertEqual
(
process_community
.
stacked_pages
.
currentWidget
(),
process_community
.
page_node
)
process_community
.
page_node
,
msg
=
"
Current widget : {0}
"
.
format
(
process_community
.
stacked_pages
.
currentWidget
().
name
()))
self
.
assertEqual
(
process_community
.
lineedit_server
.
text
(),
"
127.0.0.1
"
)
self
.
assertEqual
(
process_community
.
spinbox_port
.
value
(),
50000
)
QTest
.
mouseClick
(
process_community
.
button_register
,
Qt
.
LeftButton
)
...
...
@@ -80,9 +80,11 @@ class ProcessAddCommunity(unittest.TestCase):
self
.
assertEqual
(
mock
.
get_request
(
6
).
method
,
'
POST
'
)
self
.
assertEqual
(
mock
.
get_request
(
6
).
url
[:
8
],
'
/wot/add
'
)
self
.
assertEqual
(
process_community
.
label_error
.
text
(),
"
Broadcasting identity...
"
)
yield
from
asyncio
.
sleep
(
1
)
self
.
assertEqual
(
process_community
.
stacked_pages
.
currentWidget
(),
process_community
.
page_add_nodes
)
process_community
.
page_add_nodes
,
msg
=
"
Current widget : {0}
"
.
format
(
process_community
.
stacked_pages
.
currentWidget
().
name
()))
QTest
.
mouseClick
(
process_community
.
button_next
,
Qt
.
LeftButton
)
asyncio
.
async
(
exec_test
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment