first release v0.1
This commit is contained in:
0
tests/.gitkeep
Normal file
0
tests/.gitkeep
Normal file
0
tests/test_database_connector/__init__.py
Normal file
0
tests/test_database_connector/__init__.py
Normal file
24
tests/test_database_connector/test_database_connector.py
Normal file
24
tests/test_database_connector/test_database_connector.py
Normal file
@ -0,0 +1,24 @@
|
||||
# lassen wir weg
|
||||
import unittest
|
||||
from src.database_connector.database_connector import Neo4jConnection
|
||||
|
||||
|
||||
class TestNeo4jConnection(unittest.TestCase):
|
||||
def test_something(self):
|
||||
self.assertEqual(True, False) # add assertion here
|
||||
|
||||
def test_success(self):
|
||||
# arrange
|
||||
uri = "bolt://localhost:7687"
|
||||
username = "testuser"
|
||||
password = "wrongpw"
|
||||
|
||||
# act
|
||||
obj = Neo4jConnection(uri, username, password)
|
||||
|
||||
# assert
|
||||
# self.assertEqual(, ) # testen ob exception rauskommt
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
0
tests/xml_creator/__init__.py
Normal file
0
tests/xml_creator/__init__.py
Normal file
34
tests/xml_creator/xml_crawler.py
Normal file
34
tests/xml_creator/xml_crawler.py
Normal file
@ -0,0 +1,34 @@
|
||||
import unittest
|
||||
from src.xml_processor.xml_processor import XmlProcessor
|
||||
|
||||
|
||||
class TestXmlCrawler(unittest.TestCase):
|
||||
def test_something(self):
|
||||
self.assertEqual(True, False) # add assertion here
|
||||
|
||||
def test_get_study_data(self):
|
||||
self.assertEqual()
|
||||
|
||||
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
#def get_study_data(soup):
|
||||
# study = soup.find('Study') # find 1 tag
|
||||
# studyoid = study.get('OID')
|
||||
# if studyoid == "some OID":
|
||||
# odm = soup.find('ODM')
|
||||
# studyoid_list = [odm.get('Description')]
|
||||
# else:
|
||||
# studyoid_list = [study.get('OID')]
|
||||
# for child in study.GlobalVariables:
|
||||
if child.name == 'StudyName':
|
||||
studyname_list = [child.get_text()]
|
||||
elif child.name == 'StudyDescription':
|
||||
studydescr_list = [child.get_text()]
|
||||
studydata = pd.DataFrame({"oid": studyoid_list,
|
||||
"name": studyname_list,
|
||||
"descr": studydescr_list})
|
||||
return studydata
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Reference in New Issue
Block a user