Skip to content

Commit

Permalink
Add a wrapper to test existing Udp_server test code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Aug 11, 2024
1 parent 075c486 commit fcdfca1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_Udp_server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import unittest
from sippy.Udp_server import self_test

class TestSelfTest(unittest.TestCase):
def test_run(self):
# Create an instance of the self_test class
test_instance = self_test()

# Run the existing logic
test_instance.run()

# You can add assertions here if needed to check the final state or outcomes.
# For example, you might want to check if npongs reached 0.
self.assertEqual(test_instance.npongs, 0)

if __name__ == '__main__':
unittest.main()

0 comments on commit fcdfca1

Please sign in to comment.