mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-01-06 00:30:14 +01:00
edit some tests
This commit is contained in:
parent
2ea2e940ac
commit
a68f3f82e6
|
|
@ -59,7 +59,7 @@ class Test_Config:
|
|||
|
||||
bwConfig2 = Config()
|
||||
bwConfig2.loadConfigFile(paths.TEST_PATH + "test.ini")
|
||||
assert bwConfig2._shareConfig("test_shareConfigUsed") is False
|
||||
assert not bwConfig2._shareConfig("test_shareConfigUsed")
|
||||
|
||||
def test_getNotSetSharedConfig(self):
|
||||
"""!try to get values from shared config where not exists"""
|
||||
|
|
|
|||
|
|
@ -27,41 +27,41 @@ class Test_Descriptor:
|
|||
def test_loadCSVnotExist(self):
|
||||
"""!read CSV file where not exist direct per DescriptionList class"""
|
||||
descList = descriptor.DescriptionList()
|
||||
assert descList.loadCSV("boswatch") is False
|
||||
assert not descList.loadCSV("boswatch")
|
||||
|
||||
def test_loadCSV(self):
|
||||
"""!read CSV file direct per DescriptionList class"""
|
||||
descList = descriptor.DescriptionList()
|
||||
assert descList.loadCSV("zvei") is True
|
||||
assert descList.loadCSV("zvei")
|
||||
|
||||
def test_descriptorLoadFailed(self):
|
||||
"""!read CSV file where not exist"""
|
||||
bwDescriptor = descriptor.Descriptor()
|
||||
assert bwDescriptor.loadDescription("boswatch") is False
|
||||
assert not bwDescriptor.loadDescription("boswatch")
|
||||
|
||||
def test_descriptorLoad(self):
|
||||
"""!read CSV file"""
|
||||
bwDescriptor = descriptor.Descriptor()
|
||||
assert bwDescriptor.loadDescription("zvei") is True
|
||||
assert bwDescriptor.loadDescription("zvei")
|
||||
|
||||
def test_loadDescriptionsNotSet(self):
|
||||
"""!load descriptions where not set to an bwPacket"""
|
||||
bwDescriptor = descriptor.Descriptor()
|
||||
assert bwDescriptor.loadDescription("zvei") is True
|
||||
assert bwDescriptor.loadDescription("zvei")
|
||||
bwPacket = packet.Packet()
|
||||
bwPacket.set("mode", "zvei")
|
||||
bwPacket.set("zvei", "54321")
|
||||
assert bwDescriptor.addDescriptions(bwPacket) is True
|
||||
assert bwDescriptor.addDescriptions(bwPacket)
|
||||
assert bwPacket.get("shortDescription") is ""
|
||||
assert bwPacket.get("longDescription") is ""
|
||||
|
||||
def test_loadDescriptions(self):
|
||||
"""!load descriptions to an bwPacket"""
|
||||
bwDescriptor = descriptor.Descriptor()
|
||||
assert bwDescriptor.loadDescription("zvei") is True
|
||||
assert bwDescriptor.loadDescription("zvei")
|
||||
bwPacket = packet.Packet()
|
||||
bwPacket.set("mode", "zvei")
|
||||
bwPacket.set("zvei", "12345")
|
||||
assert bwDescriptor.addDescriptions(bwPacket) is True
|
||||
assert bwDescriptor.addDescriptions(bwPacket)
|
||||
assert bwPacket.get("shortDescription") is not ""
|
||||
assert bwPacket.get("longDescription") is not ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue