Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Dmitry Blinov
moodle_rebase10.1.2
Commits
cebd5a58
Commit
cebd5a58
authored
Mar 26, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
helloworld/test: use slapos.testing
parent
44d2ecbc
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
350 deletions
+23
-350
software/helloworld/test/setup.py
software/helloworld/test/setup.py
+17
-15
software/helloworld/test/test.py
software/helloworld/test/test.py
+6
-13
software/helloworld/test/utils.py
software/helloworld/test/utils.py
+0
-322
No files found.
software/helloworld/test/setup.py
View file @
cebd5a58
...
@@ -28,23 +28,25 @@ from setuptools import setup, find_packages
...
@@ -28,23 +28,25 @@ from setuptools import setup, find_packages
version
=
'0.0.1.dev0'
version
=
'0.0.1.dev0'
name
=
'slapos.test.helloworld'
name
=
'slapos.test.helloworld'
long_description
=
open
(
"README.md"
).
read
()
with
open
(
"README.md"
)
as
f
:
long_description
=
f
.
read
()
setup
(
name
=
name
,
setup
(
version
=
version
,
name
=
name
,
description
=
"Test for SlapOS' helloworld"
,
version
=
version
,
long_description
=
long_description
,
description
=
"Test for SlapOS' helloworld"
,
long_description_content_type
=
'text/markdown'
,
long_description
=
long_description
,
maintainer
=
"Nexedi"
,
long_description_content_type
=
'text/markdown'
,
maintainer_email
=
"info@nexedi.com"
,
maintainer
=
"Nexedi"
,
url
=
"https://lab.nexedi.com/nexedi/slapos"
,
maintainer_email
=
"info@nexedi.com"
,
packages
=
find_packages
(),
url
=
"https://lab.nexedi.com/nexedi/slapos"
,
install_requires
=
[
packages
=
find_packages
(),
install_requires
=
[
'slapos.core'
,
'slapos.core'
,
'slapos.libnetworkcache'
,
'slapos.libnetworkcache'
,
'erp5.util'
,
'erp5.util'
,
'requests'
,
'requests'
,
],
],
zip_safe
=
True
,
zip_safe
=
True
,
test_suite
=
'test'
,
test_suite
=
'test'
,
)
)
software/helloworld/test/test.py
View file @
cebd5a58
...
@@ -27,26 +27,19 @@
...
@@ -27,26 +27,19 @@
import
os
import
os
import
requests
import
requests
import
utils
# for development: debugging logs and install Ctrl+C handler
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
if
os
.
environ
.
get
(
'SLAPOS_TEST_DEBUG'
):
import
logging
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
import
unittest
unittest
.
installHandler
()
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
class
HelloWorldTestCase
(
utils
.
SlapOSInstanceTestCase
):
class
HelloWorldTestCase
(
SlapOSInstanceTestCase
):
# to be defined by subclasses
# to be defined by subclasses
name
=
None
name
=
None
kind
=
None
kind
=
None
@
classmethod
def
getSoftwareURLList
(
cls
):
return
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)),)
@
classmethod
@
classmethod
def
getInstanceParameterDict
(
cls
):
def
getInstanceParameterDict
(
cls
):
return
{
"name"
:
cls
.
name
}
return
{
"name"
:
cls
.
name
}
...
...
software/helloworld/test/utils.py
deleted
100644 → 0
View file @
44d2ecbc
This diff is collapsed.
Click to expand it.
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