daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jul 16th, 2013 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from server import BaseServer
  2.  
  3. import pytest
  4.  
  5.  
  6. class TestClass(object):
  7.  
  8.     def test_set_video_port(self):
  9.         ports = [3000, 4000, 5000, 6000, 10000, 20000]
  10.         for port in ports:
  11.             instance = BaseServer()
  12.             instance.set_video_port(port)
  13.             assert int(instance.VIDEO_PORT) == port
  14.  
  15.     def test_set_audio_port(self):
  16.         ports = [3000, 4000, 5000, 6000, 10000, 20000]
  17.         for port in ports:
  18.             instance = BaseServer()
  19.             instance.set_audio_port(port)
  20.             assert int(instance.AUDIO_PORT) == port
  21.  
  22.     def test_set_control_port(self):
  23.         ports = [3000, 4000, 5000, 6000, 10000, 20000]
  24.         for port in ports:
  25.             instance = BaseServer()
  26.             instance.set_control_port(port)
  27.             assert int(instance.CONTROL_PORT) == port
  28.  
  29.     def test_set_record_file(self):
  30.         filenames = ['', 'record', 'test-record']
  31.         for name in filenames:
  32.             instance = BaseServer()
  33.             instance.set_record_file(name)
  34.             assert instance.RECORD_FILE == name
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top