-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class GeodiensteApi: | ||
"""Handles all calls to the geodienste API""" | ||
|
||
def __init__(self): | ||
print("GeodiensteApi initialized") | ||
|
||
def topic_has_changed(self, topic_name: str): | ||
"""Check if the topic has changed since the last call""" | ||
print("Checking for changes in topics", topic_name) | ||
return True | ||
|
||
def get_topics(self, topic_name: str): | ||
"""Get all topics""" | ||
print("Getting the topic ", topic_name, " from the API") | ||
return [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import unittest | ||
from src.geodienste_api import GeodiensteApi | ||
|
||
|
||
class TestGeodiensteApi(unittest.TestCase): | ||
"""Test class for Geodienste API""" | ||
|
||
def test_topic_has_changed(self): | ||
"""Test if the topic has changed""" | ||
geodienste_api = GeodiensteApi() | ||
geodienste_api.topic_has_changed("test_topic") | ||
self.assertEqual(True, True) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |