26 lines
668 B
Python
26 lines
668 B
Python
import unittest
|
|
|
|
from AuDaGe.frame import AuDaGeFrame
|
|
|
|
|
|
class TestAuDaGeFrame(unittest.TestCase):
|
|
def test_init(self):
|
|
valid_af = {
|
|
"name": ["a", "b", "c"],
|
|
"type": ["d", "e", "f"],
|
|
"address": [1, 2, 3],
|
|
"comment": ["g", "h", "i"],
|
|
}
|
|
self.assertTrue(AuDaGeFrame(valid_af).is_valid())
|
|
invalid_af = {
|
|
"name": ["a", "b", "c"],
|
|
# "type": ["d", "e", "f"],
|
|
"address": [1, 2, 3],
|
|
"comment": ["g", "h", "i"],
|
|
}
|
|
self.assertRaises(ValueError, AuDaGeFrame, invalid_af)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main(failfast=True)
|