-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_protocole.py
More file actions
37 lines (30 loc) · 1.16 KB
/
test_protocole.py
File metadata and controls
37 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*-coding:Utf-8 -*
"""
module de test pour la classe protocole
"""
import unittest
from protocole import Protocole
class ProtocoleTest(unittest.TestCase):
"""proceédure de test """
def setUp(self):
pass
def test_protocole_execute_chat(self):
"""Test du protocole de communictaion chat"""
proto = Protocole()
self.assertEqual(proto.execute("chat:testChar"), "chat")
def test_protocole_execute_ordr(self):
"""Test du protocole de communictaion ordr"""
proto = Protocole()
self.assertEqual(proto.execute("ordr:testChar"), "ordr")
def test_protocole_execute_info(self):
"""Test du protocole de communictaion info"""
proto = Protocole()
self.assertEqual(proto.execute("info:testChar"), "info")
def test_protocole_execute_help(self):
"""Test du protocole de communictaion info"""
proto = Protocole()
self.assertEqual(proto.execute("help:testChar"), "help")
def test_protocole_execute_fin(self):
"""Test du protocole de communictaion info"""
proto = Protocole()
self.assertEqual(proto.execute("fin_:testChar"), "quitter")