Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from server import BaseServer
- import pytest
- class TestClass(object):
- def test_set_video_port(self):
- ports = [3000, 4000, 5000, 6000, 10000, 20000]
- for port in ports:
- instance = BaseServer()
- instance.set_video_port(port)
- assert int(instance.VIDEO_PORT) == port
- def test_set_audio_port(self):
- ports = [3000, 4000, 5000, 6000, 10000, 20000]
- for port in ports:
- instance = BaseServer()
- instance.set_audio_port(port)
- assert int(instance.AUDIO_PORT) == port
- def test_set_control_port(self):
- ports = [3000, 4000, 5000, 6000, 10000, 20000]
- for port in ports:
- instance = BaseServer()
- instance.set_control_port(port)
- assert int(instance.CONTROL_PORT) == port
- def test_set_record_file(self):
- filenames = ['', 'record', 'test-record']
- for name in filenames:
- instance = BaseServer()
- instance.set_record_file(name)
- assert instance.RECORD_FILE == name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement