Commit cebd5a58 authored by Jérome Perrin's avatar Jérome Perrin

helloworld/test: use slapos.testing

parent 44d2ecbc
......@@ -28,23 +28,25 @@ from setuptools import setup, find_packages
version = '0.0.1.dev0'
name = 'slapos.test.helloworld'
long_description = open("README.md").read()
with open("README.md") as f:
long_description = f.read()
setup(name=name,
version=version,
description="Test for SlapOS' helloworld",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
setup(
name=name,
version=version,
description="Test for SlapOS' helloworld",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
'slapos.core',
'slapos.libnetworkcache',
'erp5.util',
'requests',
],
zip_safe=True,
test_suite='test',
)
],
zip_safe=True,
test_suite='test',
)
......@@ -27,26 +27,19 @@
import os
import requests
import utils
# for development: debugging logs and install Ctrl+C handler
if os.environ.get('SLAPOS_TEST_DEBUG'):
import logging
logging.basicConfig(level=logging.DEBUG)
import unittest
unittest.installHandler()
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
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
name = None
kind = None
@classmethod
def getSoftwareURLList(cls):
return (os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software.cfg')),)
@classmethod
def getInstanceParameterDict(cls):
return {"name": cls.name}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment