commit 99ae801d87682904a22df66c209dec39b47bb6c5 Author: Jan Heise Date: Thu Apr 14 16:12:51 2022 +0200 initial commit, work in progress Signed-off-by: Jan Heise diff --git a/README.md b/README.md new file mode 100644 index 0000000..d709f3d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +Challenge +========= + + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..13f3c25 --- /dev/null +++ b/__init__.py @@ -0,0 +1,6 @@ +""" Mini-Challenge + +Ziel ist es, die Adapter-KLasse zu erweitern. Siehe challenge.py. +""" + +from .challenge import Adapter diff --git a/challenge.py b/challenge.py new file mode 100644 index 0000000..ac6506b --- /dev/null +++ b/challenge.py @@ -0,0 +1,13 @@ +""" Mini-Challenge """ + +class Adapter(): + """ Adapter class + + Aufgabe: Asynchron Daten lesen, konvertieren und zurückliefern. + """ + + def __init__(self, path): + self.path = path + + def retrieve_json(self, name): + pass diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..5e799af --- /dev/null +++ b/test/__init__.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +""" +Schneider Intercom ICX +====================== + +Test module + +.. moduleauthor:: Jan Heise + +""" +__copyright__ = 'Copyright (C) 2015-2022 DResearch Digital Media Systems GmbH' +__revision__ = '' +__docformat__ = 'reStructuredText' + +import os + diff --git a/test/__pycache__/__init__.cpython-37.pyc b/test/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..4a63937 Binary files /dev/null and b/test/__pycache__/__init__.cpython-37.pyc differ diff --git a/test/__pycache__/test_404_event_cam.cpython-37.pyc b/test/__pycache__/test_404_event_cam.cpython-37.pyc new file mode 100644 index 0000000..2261969 Binary files /dev/null and b/test/__pycache__/test_404_event_cam.cpython-37.pyc differ diff --git a/test/data/__init__.py b/test/data/__init__.py new file mode 100644 index 0000000..159dc60 --- /dev/null +++ b/test/data/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +""" +Schneider Intercom IXC +====================== + +Test data + +.. moduleauthor:: Jan Heise + +""" +__copyright__ = 'Copyright (C) 2015-2022 DResearch Digital Media Systems GmbH' +__revision__ = '' +__docformat__ = 'reStructuredText' + +import os + +# Defines the directory for the test data +TEST_DATA_DIR = os.path.dirname(__file__) diff --git a/test/data/__pycache__/__init__.cpython-37.pyc b/test/data/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..75f61f1 Binary files /dev/null and b/test/data/__pycache__/__init__.cpython-37.pyc differ diff --git a/test/test_404_event_cam.py b/test/test_404_event_cam.py new file mode 100644 index 0000000..446ce9f --- /dev/null +++ b/test/test_404_event_cam.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +""" +Acceptance Test +~~~~~~~~~~~~~~~ + +:Ablauf: + - Adapter wird erzeugt + - Daten werden angefordert + +:Erwartetes Ergebnis: + - Daten sind korrekt +""" +from nose.tools import assert_equals +from .. import Adapter + +def test_acceptance(): + """ Acceptance Test """ + + adapter = Adapter