Add initial tests
This commit is contained in:
22
tests/test_mqtt_voter.py
Normal file
22
tests/test_mqtt_voter.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
from DecisionSystem.mqttvoter import MqttVoter
|
||||
from DecisionSystem.vote import Vote
|
||||
|
||||
class TestMqttVoter(unittest.TestCase):
|
||||
|
||||
def test_vote_property(self):
|
||||
self.assertTrue(self.voter.set_vote(Vote()))
|
||||
self.assertEquals(self.voter.get_vote(), Vote())
|
||||
|
||||
def test_invalid_vote_set(self):
|
||||
self.assertFalse(self.voter.set_vote("Hi"))
|
||||
|
||||
@unittest.skip
|
||||
def test_submit_vote(self):
|
||||
pass
|
||||
|
||||
def setUp(self):
|
||||
self.voter = MqttVoter()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user