Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bandwidth/model/bxml/verbs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .record import Record
from .start_recording import StartRecording
from .sip_uri import SipUri
from .stop_recording import StopRecording
from .speak_sentence import SpeakSentence
from .tag import Tag
from .transfer import Transfer
19 changes: 19 additions & 0 deletions bandwidth/model/bxml/verbs/stop_recording.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
record.py

Bandwidth's StopRecording BXML verb

@copyright Bandwidth INC
"""
from ..terminal_verb import TerminalVerb


class StopRecording(TerminalVerb):

def __init__(self):
"""Initialize a <StopRecording> verb

Args: There are no args or text content for StopRecording
"""

super().__init__(tag="StopRecording", content=None)
27 changes: 27 additions & 0 deletions test/unit/bxml/test_stop_recording.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
test_stop_recording.py

Unit tests for the <StopRecording> BXML verb

@copyright Bandwidth Inc.
"""
import pytest
import unittest

from bandwidth.model.bxml.verb import Verb
from bandwidth.model.bxml.verbs.stop_recording import StopRecording


class TestTag(unittest.TestCase):

def setUp(self):
self.stop_recording = StopRecording()
self.test_verb = Verb(tag="test")

def test_to_bxml(self):
expected = '<StopRecording />'
assert(expected == self.stop_recording.to_bxml())

def test_add_verb(self):
with pytest.raises(AttributeError):
self.stop_recording.add_verb(self.test_verb)