import unittest import time from Thing import Thing from Participant import Participant class ThingTest(unittest.TestCase): def test_client_msg(self): participant: Participant = Participant(ipAddress="127.0.0.1", port=7681) thing: Thing = Thing() milliseconds = time.time() * 1000 thing.update(milliseconds) Thing.UpdateAll(milliseconds) start_time = milliseconds while milliseconds < start_time + 5000: milliseconds = time.time() * 1000 participant.Update(milliseconds) def test_thing_msg(self): participant = Participant("127.0.0.1") thing = Thing() thing.name = "First thing" thing.model_url = "https://passer.life/extras/ant.jpg" milliseconds = time.time() * 1000 start_time = milliseconds while milliseconds < start_time + 6000: milliseconds = time.time() * 1000 participant.Update(milliseconds) if __name__ == '__main__': unittest.main()