test: add response_metadata test.
This commit is contained in:
parent
75ad24fdbb
commit
b16aea5b1d
|
@ -5,5 +5,9 @@ Estudio: Librería para jugar con Freeswitch.
|
|||
+ Al conectarse al servidor se recibe: "Content-Type: auth/request"
|
||||
+ comando para autenticarse: "auth"
|
||||
+ respuesta de autenticacion correcta: "Content-Type: command/reply\nReply-Text: +OK accepted"
|
||||
|
||||
## Tests
|
||||
Correr los tests
|
||||
```sh
|
||||
python -m unittest tests/response_metadata.py
|
||||
```
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import unittest
|
||||
|
||||
from FreeTwitch.response_metadata import ResponseMetadata
|
||||
|
||||
class TestResponseMetadata(unittest.TestCase):
|
||||
|
||||
def test_from_string(self):
|
||||
response = """Content-Type: api/response
|
||||
Content-Length: 28"""
|
||||
response_metadata = ResponseMetadata.from_string(response)
|
||||
self.assertEqual(28, response_metadata.length)
|
||||
|
Loading…
Reference in New Issue