diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 40790d8..8396f65 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -127,6 +127,7 @@ docs/SetTalk.md docs/Sms.md docs/StartRecordCall.md docs/TFN.md +docs/TFNCampaign.md docs/TerminateConference.md docs/TranscribeReason.md docs/TranscribeTermReason.md @@ -275,6 +276,7 @@ freeclimb/models/sms_toll_free_campaigns_list_result.py freeclimb/models/start_record_call.py freeclimb/models/terminate_conference.py freeclimb/models/tfn.py +freeclimb/models/tfn_campaign.py freeclimb/models/transcribe_reason.py freeclimb/models/transcribe_term_reason.py freeclimb/models/transcribe_utterance.py @@ -422,6 +424,7 @@ test/test_sms_toll_free_campaigns_list_result.py test/test_start_record_call.py test/test_terminate_conference.py test/test_tfn.py +test/test_tfn_campaign.py test/test_transcribe_reason.py test/test_transcribe_term_reason.py test/test_transcribe_utterance.py diff --git a/CHANGELOG.md b/CHANGELOG.md index f10209c..d52357d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,19 +9,30 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm None + + +## [5.1.0] - 2025-02-05 + +### Added + +- CampaignTFN and MessageResultsAllOfTfn models + ## [5.0.0] - 2025-01-08 ### Added + - Webhook classes - More idiomated Enum management ### Changed + - Use upgraded openapi generator ### Removed -- *AllOf model files + +- \*AllOf model files diff --git a/README.md b/README.md index 979f10f..bcce84a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 5.0.0 +- Package version: 5.1.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) @@ -303,6 +303,7 @@ Class | Method | HTTP request | Description - [Sms](docs/Sms.md) - [StartRecordCall](docs/StartRecordCall.md) - [TFN](docs/TFN.md) + - [TFNCampaign](docs/TFNCampaign.md) - [TerminateConference](docs/TerminateConference.md) - [TranscribeReason](docs/TranscribeReason.md) - [TranscribeTermReason](docs/TranscribeTermReason.md) diff --git a/docs/MessageResult.md b/docs/MessageResult.md index ffeffea..6b7786b 100644 --- a/docs/MessageResult.md +++ b/docs/MessageResult.md @@ -21,6 +21,9 @@ Name | Type | Description | Notes **campaign_id** | **str** | The unique identifier for the campaign associated with the message | [optional] **segment_count** | **float** | The number of segments into which the message was split | [optional] **media_urls** | **List[str]** | an array of HTTP URLs which were attached this this message | [optional] +**tfn** | [**TFN**](TFN.md) | | [optional] +**phone_number_id** | **str** | String that uniquely identifies the phoneNumber resource used to send this Message | [optional] +**application_id** | **str** | String that uniquely identifies the Application resource used to send this Message | [optional] ## Example diff --git a/docs/TFNCampaign.md b/docs/TFNCampaign.md new file mode 100644 index 0000000..693de4a --- /dev/null +++ b/docs/TFNCampaign.md @@ -0,0 +1,37 @@ +# TFNCampaign + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **str** | ID of the account that created this participant. | +**campaign_id** | **str** | TFNCampaignId | +**use_case** | **str** | | +**registration_status** | [**SMSTollFreeCampaignRegistrationStatus**](SMSTollFreeCampaignRegistrationStatus.md) | | +**date_created** | **str** | | +**date_updated** | **str** | | +**date_created_iso** | **str** | | +**date_updated_iso** | **str** | | +**revision** | **int** | | + +## Example + +```python +from freeclimb.models.tfn_campaign import TFNCampaign + +# TODO update the JSON string below +json = "{}" +# create an instance of TFNCampaign from a JSON string +tfn_campaign_instance = TFNCampaign.from_json(json) +# print the JSON string representation of the object +print(TFNCampaign.to_json()) + +# convert the object into a dict +tfn_campaign_dict = tfn_campaign_instance.to_dict() +# create an instance of TFNCampaign from a dict +tfn_campaign_from_dict = TFNCampaign.from_dict(tfn_campaign_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/freeclimb/__init__.py b/freeclimb/__init__.py index 742309e..2e9c502 100644 --- a/freeclimb/__init__.py +++ b/freeclimb/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "5.0.0" +__version__ = "5.1.0" # import apis into sdk package from freeclimb.api.default_api import DefaultApi as DefaultApi @@ -248,6 +248,7 @@ from freeclimb.models.sms import Sms as Sms from freeclimb.models.start_record_call import StartRecordCall as StartRecordCall from freeclimb.models.tfn import TFN as TFN +from freeclimb.models.tfn_campaign import TFNCampaign as TFNCampaign from freeclimb.models.terminate_conference import ( TerminateConference as TerminateConference, ) diff --git a/freeclimb/api_client.py b/freeclimb/api_client.py index 3266bd4..28a985c 100644 --- a/freeclimb/api_client.py +++ b/freeclimb/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/5.0.0/python" + self.user_agent = "OpenAPI-Generator/5.1.0/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/freeclimb/configuration.py b/freeclimb/configuration.py index 5be3935..6df67e1 100644 --- a/freeclimb/configuration.py +++ b/freeclimb/configuration.py @@ -427,7 +427,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.0.0\n" - "SDK Package Version: 5.0.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 5.1.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/freeclimb/model_utils.py b/freeclimb/model_utils.py index c263c78..5997358 100644 --- a/freeclimb/model_utils.py +++ b/freeclimb/model_utils.py @@ -1,11 +1,11 @@ """ - FreeClimb API +FreeClimb API - FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 +FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Contact: support@freeclimb.com - Generated by: https://openapi-generator.tech +The version of the OpenAPI document: 1.0.0 +Contact: support@freeclimb.com +Generated by: https://openapi-generator.tech """ from datetime import date, datetime # noqa: F401 diff --git a/freeclimb/models/__init__.py b/freeclimb/models/__init__.py index 361615f..fb6d2f1 100644 --- a/freeclimb/models/__init__.py +++ b/freeclimb/models/__init__.py @@ -231,6 +231,7 @@ from freeclimb.models.sms import Sms as Sms from freeclimb.models.start_record_call import StartRecordCall as StartRecordCall from freeclimb.models.tfn import TFN as TFN +from freeclimb.models.tfn_campaign import TFNCampaign as TFNCampaign from freeclimb.models.terminate_conference import ( TerminateConference as TerminateConference, ) diff --git a/freeclimb/models/message_result.py b/freeclimb/models/message_result.py index 4bdb256..4141b6f 100644 --- a/freeclimb/models/message_result.py +++ b/freeclimb/models/message_result.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from freeclimb.models.message_status import MessageStatus +from freeclimb.models.tfn import TFN from pydantic import StrictStr from typing import Optional, Set from typing_extensions import Self @@ -99,6 +100,17 @@ class MessageResult( description="an array of HTTP URLs which were attached this this message", alias="mediaUrls", ) + tfn: Optional[TFN] = None + phone_number_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies the phoneNumber resource used to send this Message", + alias="phoneNumberId", + ) + application_id: Optional[StrictStr] = Field( + default=None, + description="String that uniquely identifies the Application resource used to send this Message", + alias="applicationId", + ) __properties: ClassVar[List[str]] = [ "uri", @@ -117,6 +129,9 @@ class MessageResult( "campaignId", "segmentCount", "mediaUrls", + "tfn", + "phoneNumberId", + "applicationId", ] def to_str(self) -> str: @@ -150,6 +165,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of tfn + if self.tfn: + _dict["tfn"] = self.tfn.to_dict() # set to None if account_id (nullable) is None # and model_fields_set contains the field if self.account_id is None and "account_id" in self.model_fields_set: @@ -213,6 +231,16 @@ def to_dict(self) -> Dict[str, Any]: if self.media_urls is None and "media_urls" in self.model_fields_set: _dict["mediaUrls"] = None + # set to None if phone_number_id (nullable) is None + # and model_fields_set contains the field + if self.phone_number_id is None and "phone_number_id" in self.model_fields_set: + _dict["phoneNumberId"] = None + + # set to None if application_id (nullable) is None + # and model_fields_set contains the field + if self.application_id is None and "application_id" in self.model_fields_set: + _dict["applicationId"] = None + return _dict @classmethod @@ -242,6 +270,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "campaignId": obj.get("campaignId"), "segmentCount": obj.get("segmentCount"), "mediaUrls": obj.get("mediaUrls"), + "tfn": ( + TFN.from_dict(obj["tfn"]) if obj.get("tfn") is not None else None + ), + "phoneNumberId": obj.get("phoneNumberId"), + "applicationId": obj.get("applicationId"), } ) return _obj diff --git a/freeclimb/models/tfn_campaign.py b/freeclimb/models/tfn_campaign.py new file mode 100644 index 0000000..e9fd383 --- /dev/null +++ b/freeclimb/models/tfn_campaign.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from freeclimb.models.sms_toll_free_campaign_registration_status import ( + SMSTollFreeCampaignRegistrationStatus, +) +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class TFNCampaign( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + TFNCampaign + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + description="ID of the account that created this participant.", + alias="accountId", + ) + campaign_id: Annotated[str, Field(strict=True)] = Field( + description="TFNCampaignId", alias="campaignId" + ) + use_case: StrictStr = Field(alias="useCase") + registration_status: SMSTollFreeCampaignRegistrationStatus = Field( + alias="registrationStatus" + ) + date_created: StrictStr = Field(alias="dateCreated") + date_updated: StrictStr = Field(alias="dateUpdated") + date_created_iso: StrictStr = Field(alias="dateCreatedISO") + date_updated_iso: StrictStr = Field(alias="dateUpdatedISO") + revision: StrictInt + + __properties: ClassVar[List[str]] = [ + "accountId", + "campaignId", + "useCase", + "registrationStatus", + "dateCreated", + "dateUpdated", + "dateCreatedISO", + "dateUpdatedISO", + "revision", + ] + + @field_validator("campaign_id") + def campaign_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"cmptfn_[a-fA-F0-9]{40}", value): + raise ValueError( + r"must validate the regular expression /cmptfn_[a-fA-F0-9]{40}/" + ) + return value + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TFNCampaign from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TFNCampaign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "campaignId": obj.get("campaignId"), + "useCase": obj.get("useCase"), + "registrationStatus": obj.get("registrationStatus"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "dateCreatedISO": obj.get("dateCreatedISO"), + "dateUpdatedISO": obj.get("dateUpdatedISO"), + "revision": obj.get("revision"), + } + ) + return _obj diff --git a/openapi.json b/openapi.json index 16e3520..0302013 100644 --- a/openapi.json +++ b/openapi.json @@ -151,12 +151,7 @@ }, "GetDigitsReason": { "type": "string", - "enum": [ - "finishKey", - "timeout", - "maxDigits", - "tone" - ], + "enum": ["finishKey", "timeout", "maxDigits", "tone"], "description": "This field explains how the GetDigits action ended. The value is one of the below: •finishKey - The finish key as specified had been pressed by the caller. Digit string has all keys up to, but not including, the finish key. •timeout - The timeout limit was reached prior to any other criteria being met. If any digits were collected, they will be included. •maxDigits - The maximum number of digits was reached and digit collection ended. •tone - Answering machine or fax tone detection occurred, interrupting digit collection. Any digits received up to this point are included in this webhook." }, "ConferenceStatus": { @@ -420,12 +415,7 @@ "SMSTenDLCBrandIdentityStatus": { "type": "string", "description": "TCR assessment of the brand identification status.", - "enum": [ - "SELF_DECLARED", - "UNVERIFIED", - "VERIFIED", - "VETTED_VERIFIED" - ] + "enum": ["SELF_DECLARED", "UNVERIFIED", "VERIFIED", "VETTED_VERIFIED"] }, "CompletionResultStatus": { "type": "string", @@ -494,32 +484,32 @@ "Webhook": { "type": "object", "discriminator": { - "propertyName": "requestType", - "mapping": { - "addToConferenceNotification": "#/components/schemas/AddToConferenceNotificationWebhook", - "addToQueueNotification": "#/components/schemas/AddToQueueNotificationWebhook", - "callControl": "#/components/schemas/CallControlWebhook", - "callStatus": "#/components/schemas/CallStatusWebhook", - "conferenceRecordingStatus": "#/components/schemas/ConferenceRecordingStatusWebhook", - "conferenceStatus": "#/components/schemas/ConferenceStatusWebhook", - "createConference": "#/components/schemas/CreateConferenceWebhook", - "dequeue": "#/components/schemas/DequeueWebhook", - "getDigits": "#/components/schemas/GetDigitsWebhook", - "getSpeech": "#/components/schemas/GetSpeechWebhook", - "inboundCall": "#/components/schemas/InboundCallWebhook", - "leaveConference": "#/components/schemas/LeaveConferenceWebhook", - "machineDetected": "#/components/schemas/MachineDetectedWebhook", - "messageDelivery": "#/components/schemas/MessageDeliveryWebhook", - "messageStatus": "#/components/schemas/MessageStatusWebhook", - "outDialApiConnect": "#/components/schemas/OutDialApiConnectWebhook", - "outDialConnect": "#/components/schemas/OutDialConnectWebhook", - "outDialStart": "#/components/schemas/OutDialStartWebhook", - "queueWait": "#/components/schemas/QueueWaitWebhook", - "record": "#/components/schemas/RecordWebhook", - "redirect": "#/components/schemas/RedirectWebhook", - "removeFromQueueNotification": "#/components/schemas/RemoveFromQueueNotificationWebhook", - "transcribe": "#/components/schemas/TranscribeWebhook" - } + "propertyName": "requestType", + "mapping": { + "addToConferenceNotification": "#/components/schemas/AddToConferenceNotificationWebhook", + "addToQueueNotification": "#/components/schemas/AddToQueueNotificationWebhook", + "callControl": "#/components/schemas/CallControlWebhook", + "callStatus": "#/components/schemas/CallStatusWebhook", + "conferenceRecordingStatus": "#/components/schemas/ConferenceRecordingStatusWebhook", + "conferenceStatus": "#/components/schemas/ConferenceStatusWebhook", + "createConference": "#/components/schemas/CreateConferenceWebhook", + "dequeue": "#/components/schemas/DequeueWebhook", + "getDigits": "#/components/schemas/GetDigitsWebhook", + "getSpeech": "#/components/schemas/GetSpeechWebhook", + "inboundCall": "#/components/schemas/InboundCallWebhook", + "leaveConference": "#/components/schemas/LeaveConferenceWebhook", + "machineDetected": "#/components/schemas/MachineDetectedWebhook", + "messageDelivery": "#/components/schemas/MessageDeliveryWebhook", + "messageStatus": "#/components/schemas/MessageStatusWebhook", + "outDialApiConnect": "#/components/schemas/OutDialApiConnectWebhook", + "outDialConnect": "#/components/schemas/OutDialConnectWebhook", + "outDialStart": "#/components/schemas/OutDialStartWebhook", + "queueWait": "#/components/schemas/QueueWaitWebhook", + "record": "#/components/schemas/RecordWebhook", + "redirect": "#/components/schemas/RedirectWebhook", + "removeFromQueueNotification": "#/components/schemas/RemoveFromQueueNotificationWebhook", + "transcribe": "#/components/schemas/TranscribeWebhook" + } }, "properties": { "requestType": { @@ -3596,11 +3586,76 @@ "format": "uri" }, "nullable": true + }, + "tfn": { + "$ref": "#/components/schemas/TFN", + "nullable": true + }, + "phoneNumberId": { + "type": "string", + "description": "String that uniquely identifies the phoneNumber resource used to send this Message", + "nullable": true + }, + "applicationId": { + "type": "string", + "description": "String that uniquely identifies the Application resource used to send this Message", + "nullable": true } } } ] }, + "TFNCampaign": { + "type": "object", + "required": [ + "accountId", + "campaignId", + "useCase", + "registrationStatus", + "dateCreated", + "dateUpdated", + "dateCreatedISO", + "dateUpdatedISO", + "revision" + ], + "properties": { + "accountId": { + "type": "string", + "description": "ID of the account that created this participant.", + "nullable": true + }, + "campaignId": { + "$ref": "#/components/schemas/TFNCampaignId" + }, + "useCase": { + "type": "string" + }, + "registrationStatus": { + "$ref": "#/components/schemas/SMSTollFreeCampaignRegistrationStatus" + }, + "dateCreated": { + "type": "string" + }, + "dateUpdated": { + "type": "string" + }, + "dateCreatedISO": { + "type": "string" + }, + "dateUpdatedISO": { + "type": "string" + }, + "revision": { + "type": "integer" + } + } + }, + "TFNCampaignId": { + "type": "string", + "description": "TFNCampaignId", + "pattern": "cmptfn_[a-fA-F0-9]{40}", + "example": "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a" + }, "CreateConferenceRequest": { "type": "object", "properties": { diff --git a/pyproject.toml b/pyproject.toml index 8bbc602..bfc7645 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "freeclimb" -version = "5.0.0" +version = "5.1.0" description = "FreeClimb API" authors = ["FreeClimb API Support "] license = "NoLicense" diff --git a/setup.py b/setup.py index 0ffea03..c5f92c0 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "FreeClimb" -VERSION = "5.0.0" +VERSION = "5.1.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test-requirements.txt b/test-requirements.txt index 0342fd5..61b113a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ pytest~=7.3.1 # needed for python 2.7+3.4 pytest-cov>=2.8.1 +black==24.8.0 pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/test/manual/test_percl_generation.py b/test/manual/test_percl_generation.py index 5eeeae7..7f6d5fe 100644 --- a/test/manual/test_percl_generation.py +++ b/test/manual/test_percl_generation.py @@ -1,9 +1,9 @@ """ - FreeClimb API +FreeClimb API - This is a manually implemented test to validate the - contents of https://github.com/FreeClimbAPI/Python-Getting-Started-Tutorial/blob/master/python-getting-started.py - are functioning as expected +This is a manually implemented test to validate the +contents of https://github.com/FreeClimbAPI/Python-Getting-Started-Tutorial/blob/master/python-getting-started.py +are functioning as expected """ import unittest @@ -25,11 +25,11 @@ def testPerclGeneration(self): get_speech = freeclimb.GetSpeech( action_url="http://example.com/actionurl/getspeech", prompts=[say], - grammar_file="grammar.xml" + grammar_file="grammar.xml", ) record_utterance = freeclimb.RecordUtterance( action_url="http://example.actionurl/recordutterance", - silence_timeout_ms=1000 + silence_timeout_ms=1000, ) script = freeclimb.PerclScript(commands=[say, get_speech, record_utterance]) data = script.to_json() @@ -37,13 +37,7 @@ def testPerclGeneration(self): print(data) expected_json = json.dumps( [ - { - "Say": { - "text": "Hello, FreeClimb!", - "loop": 1, - "privacyMode": True - } - }, + {"Say": {"text": "Hello, FreeClimb!", "loop": 1, "privacyMode": True}}, { "GetSpeech": { "actionUrl": "http://example.com/actionurl/getspeech", @@ -53,22 +47,23 @@ def testPerclGeneration(self): "Say": { "text": "Hello, FreeClimb!", "loop": 1, - "privacyMode": True + "privacyMode": True, } } - ] + ], } }, { "RecordUtterance": { "actionUrl": "http://example.actionurl/recordutterance", - "silenceTimeoutMs": 1000 + "silenceTimeoutMs": 1000, } - } - ]) + }, + ] + ) self.maxDiff = None self.assertEqual(data, expected_json) -if __name__ == '__main__': - unittest.main() \ No newline at end of file +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_account_request.py b/test/models/test_account_request.py index b4ead6c..18bd35a 100644 --- a/test/models/test_account_request.py +++ b/test/models/test_account_request.py @@ -29,11 +29,13 @@ def setUp(self): def test_alias(self): """Test AccountRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" def test_label(self): """Test AccountRequest.label""" + self.model.label = "TEST_STRING" assert self.model.label == "TEST_STRING" diff --git a/test/models/test_account_result.py b/test/models/test_account_result.py index 06e371b..52b1ba7 100644 --- a/test/models/test_account_result.py +++ b/test/models/test_account_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test AccountResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test AccountResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test AccountResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,21 +52,25 @@ def test_revision(self): def test_account_id(self): """Test AccountResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_api_key(self): """Test AccountResult.api_key""" + self.model.api_key = "TEST_STRING" assert self.model.api_key == "TEST_STRING" def test_alias(self): """Test AccountResult.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" def test_label(self): """Test AccountResult.label""" + self.model.label = "TEST_STRING" assert self.model.label == "TEST_STRING" @@ -85,9 +92,9 @@ def test_status(self): def test_subresource_uris(self): """Test AccountResult.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.subresource_uris == testObject + object = None + self.model.subresource_uris = object + assert self.model.subresource_uris == object if __name__ == "__main__": diff --git a/test/models/test_add_to_conference.py b/test/models/test_add_to_conference.py index 7a1e4d0..9ca620a 100644 --- a/test/models/test_add_to_conference.py +++ b/test/models/test_add_to_conference.py @@ -26,7 +26,7 @@ class TestAddToConference(unittest.TestCase): def setUp(self): self.model = AddToConference( - conference_id="", + conference_id="TS", ) def test_allow_call_control(self): @@ -36,6 +36,7 @@ def test_allow_call_control(self): def test_call_control_sequence(self): """Test AddToConference.call_control_sequence""" + self.model.call_control_sequence = "TEST_STRING" assert self.model.call_control_sequence == "TEST_STRING" @@ -46,6 +47,7 @@ def test_call_control_url(self): def test_conference_id(self): """Test AddToConference.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" diff --git a/test/models/test_add_to_conference_notification_webhook.py b/test/models/test_add_to_conference_notification_webhook.py index a3eb7dc..865a95d 100644 --- a/test/models/test_add_to_conference_notification_webhook.py +++ b/test/models/test_add_to_conference_notification_webhook.py @@ -34,21 +34,25 @@ def test_request_type(self): def test_call_id(self): """Test AddToConferenceNotificationWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test AddToConferenceNotificationWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test AddToConferenceNotificationWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test AddToConferenceNotificationWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -82,11 +86,13 @@ def test_direction(self): def test_conference_id(self): """Test AddToConferenceNotificationWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test AddToConferenceNotificationWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" @@ -108,6 +114,7 @@ def test_recording_url(self): def test_recording_id(self): """Test AddToConferenceNotificationWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" diff --git a/test/models/test_add_to_queue_notification_webhook.py b/test/models/test_add_to_queue_notification_webhook.py index a9c6987..617ef33 100644 --- a/test/models/test_add_to_queue_notification_webhook.py +++ b/test/models/test_add_to_queue_notification_webhook.py @@ -34,21 +34,25 @@ def test_request_type(self): def test_call_id(self): """Test AddToQueueNotificationWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test AddToQueueNotificationWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test AddToQueueNotificationWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test AddToQueueNotificationWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -82,11 +86,13 @@ def test_direction(self): def test_conference_id(self): """Test AddToQueueNotificationWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test AddToQueueNotificationWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" diff --git a/test/models/test_application_list.py b/test/models/test_application_list.py index 287da12..f729dfc 100644 --- a/test/models/test_application_list.py +++ b/test/models/test_application_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test ApplicationList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_application_request.py b/test/models/test_application_request.py index dff999e..76a013a 100644 --- a/test/models/test_application_request.py +++ b/test/models/test_application_request.py @@ -29,6 +29,7 @@ def setUp(self): def test_alias(self): """Test ApplicationRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" diff --git a/test/models/test_application_result.py b/test/models/test_application_result.py index 2fa560d..975537a 100644 --- a/test/models/test_application_result.py +++ b/test/models/test_application_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test ApplicationResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test ApplicationResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test ApplicationResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,16 +52,19 @@ def test_revision(self): def test_account_id(self): """Test ApplicationResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_application_id(self): """Test ApplicationResult.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" def test_alias(self): """Test ApplicationResult.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" diff --git a/test/models/test_available_number.py b/test/models/test_available_number.py index be39a3c..911e857 100644 --- a/test/models/test_available_number.py +++ b/test/models/test_available_number.py @@ -41,11 +41,13 @@ def test_capabilities(self): def test_campaign_id(self): """Test AvailableNumber.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" def test_phone_number(self): """Test AvailableNumber.phone_number""" + self.model.phone_number = "TEST_STRING" assert self.model.phone_number == "TEST_STRING" @@ -61,11 +63,13 @@ def test_sms_enabled(self): def test_region(self): """Test AvailableNumber.region""" + self.model.region = "TEST_STRING" assert self.model.region == "TEST_STRING" def test_country(self): """Test AvailableNumber.country""" + self.model.country = "TEST_STRING" assert self.model.country == "TEST_STRING" diff --git a/test/models/test_available_number_list.py b/test/models/test_available_number_list.py index fb2c3e1..da8dc3d 100644 --- a/test/models/test_available_number_list.py +++ b/test/models/test_available_number_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test AvailableNumberList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_buy_incoming_number_request.py b/test/models/test_buy_incoming_number_request.py index d4c8aac..4309b89 100644 --- a/test/models/test_buy_incoming_number_request.py +++ b/test/models/test_buy_incoming_number_request.py @@ -26,21 +26,24 @@ class TestBuyIncomingNumberRequest(unittest.TestCase): def setUp(self): self.model = BuyIncomingNumberRequest( - phone_number="", + phone_number="TS", ) def test_phone_number(self): """Test BuyIncomingNumberRequest.phone_number""" + self.model.phone_number = "TEST_STRING" assert self.model.phone_number == "TEST_STRING" def test_alias(self): """Test BuyIncomingNumberRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" def test_application_id(self): """Test BuyIncomingNumberRequest.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" diff --git a/test/models/test_call_control_webhook.py b/test/models/test_call_control_webhook.py index 5a8995b..20ef1d0 100644 --- a/test/models/test_call_control_webhook.py +++ b/test/models/test_call_control_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test CallControlWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test CallControlWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_conference_id(self): """Test CallControlWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_digits(self): """Test CallControlWebhook.digits""" + self.model.digits = "TEST_STRING" assert self.model.digits == "TEST_STRING" diff --git a/test/models/test_call_list.py b/test/models/test_call_list.py index e4a152b..fedb982 100644 --- a/test/models/test_call_list.py +++ b/test/models/test_call_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test CallList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_call_result.py b/test/models/test_call_result.py index ccae59f..c1f92dd 100644 --- a/test/models/test_call_result.py +++ b/test/models/test_call_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test CallResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test CallResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test CallResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,31 +52,37 @@ def test_revision(self): def test_call_id(self): """Test CallResult.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_parent_call_id(self): """Test CallResult.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" def test_account_id(self): """Test CallResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test CallResult.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test CallResult.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_phone_number_id(self): """Test CallResult.phone_number_id""" + self.model.phone_number_id = "TEST_STRING" assert self.model.phone_number_id == "TEST_STRING" @@ -98,16 +107,19 @@ def test_call_status(self): def test_start_time(self): """Test CallResult.start_time""" + self.model.start_time = "TEST_STRING" assert self.model.start_time == "TEST_STRING" def test_connect_time(self): """Test CallResult.connect_time""" + self.model.connect_time = "TEST_STRING" assert self.model.connect_time == "TEST_STRING" def test_end_time(self): """Test CallResult.end_time""" + self.model.end_time = "TEST_STRING" assert self.model.end_time == "TEST_STRING" @@ -139,12 +151,13 @@ def test_answered_by(self): def test_subresource_uris(self): """Test CallResult.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.subresource_uris == testObject + object = None + self.model.subresource_uris = object + assert self.model.subresource_uris == object def test_application_id(self): """Test CallResult.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" diff --git a/test/models/test_call_status_webhook.py b/test/models/test_call_status_webhook.py index 2ca247d..5c3689d 100644 --- a/test/models/test_call_status_webhook.py +++ b/test/models/test_call_status_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test CallStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test CallStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test CallStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test CallStatusWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -131,11 +135,13 @@ def test_direction(self): def test_conference_id(self): """Test CallStatusWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test CallStatusWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" diff --git a/test/models/test_completion_request.py b/test/models/test_completion_request.py index 9668737..24d26e6 100644 --- a/test/models/test_completion_request.py +++ b/test/models/test_completion_request.py @@ -26,7 +26,7 @@ class TestCompletionRequest(unittest.TestCase): def setUp(self): self.model = CompletionRequest( - query="", + query="TS", ) def test_query(self): diff --git a/test/models/test_completion_result.py b/test/models/test_completion_result.py index b7f463c..38d9ab2 100644 --- a/test/models/test_completion_result.py +++ b/test/models/test_completion_result.py @@ -26,12 +26,13 @@ class TestCompletionResult(unittest.TestCase): def setUp(self): self.model = CompletionResult( - response="", + response="TS", status=CompletionResultStatus.SUCCESS, ) def test_response(self): """Test CompletionResult.response""" + self.model.response = "TEST_STRING" assert self.model.response == "TEST_STRING" diff --git a/test/models/test_conference_list.py b/test/models/test_conference_list.py index 68e3d8c..9af8921 100644 --- a/test/models/test_conference_list.py +++ b/test/models/test_conference_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test ConferenceList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_conference_participant_list.py b/test/models/test_conference_participant_list.py index 49324fd..9ba5fee 100644 --- a/test/models/test_conference_participant_list.py +++ b/test/models/test_conference_participant_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test ConferenceParticipantList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_conference_participant_result.py b/test/models/test_conference_participant_result.py index ed2dee5..236369f 100644 --- a/test/models/test_conference_participant_result.py +++ b/test/models/test_conference_participant_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test ConferenceParticipantResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test ConferenceParticipantResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test ConferenceParticipantResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,16 +52,19 @@ def test_revision(self): def test_account_id(self): """Test ConferenceParticipantResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_conference_id(self): """Test ConferenceParticipantResult.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_call_id(self): """Test ConferenceParticipantResult.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" diff --git a/test/models/test_conference_recording_status_webhook.py b/test/models/test_conference_recording_status_webhook.py index 892d1be..60db0fc 100644 --- a/test/models/test_conference_recording_status_webhook.py +++ b/test/models/test_conference_recording_status_webhook.py @@ -34,21 +34,25 @@ def test_request_type(self): def test_call_id(self): """Test ConferenceRecordingStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test ConferenceRecordingStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test ConferenceRecordingStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test ConferenceRecordingStatusWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -82,11 +86,13 @@ def test_direction(self): def test_conference_id(self): """Test ConferenceRecordingStatusWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test ConferenceRecordingStatusWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" @@ -108,6 +114,7 @@ def test_recording_url(self): def test_recording_id(self): """Test ConferenceRecordingStatusWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" diff --git a/test/models/test_conference_result.py b/test/models/test_conference_result.py index 41df7de..ab3113a 100644 --- a/test/models/test_conference_result.py +++ b/test/models/test_conference_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test ConferenceResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test ConferenceResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test ConferenceResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,16 +52,19 @@ def test_revision(self): def test_conference_id(self): """Test ConferenceResult.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_account_id(self): """Test ConferenceResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_alias(self): """Test ConferenceResult.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" @@ -106,9 +112,9 @@ def test_status_callback_url(self): def test_subresource_uris(self): """Test ConferenceResult.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.subresource_uris == testObject + object = None + self.model.subresource_uris = object + assert self.model.subresource_uris == object if __name__ == "__main__": diff --git a/test/models/test_conference_status_webhook.py b/test/models/test_conference_status_webhook.py index c1d316b..d61aed3 100644 --- a/test/models/test_conference_status_webhook.py +++ b/test/models/test_conference_status_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test ConferenceStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test ConferenceStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test ConferenceStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test ConferenceStatusWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,11 +84,13 @@ def test_direction(self): def test_conference_id(self): """Test ConferenceStatusWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test ConferenceStatusWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" @@ -106,6 +112,7 @@ def test_recording_url(self): def test_recording_id(self): """Test ConferenceStatusWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" diff --git a/test/models/test_create_conference.py b/test/models/test_create_conference.py index 2d2d585..e69d183 100644 --- a/test/models/test_create_conference.py +++ b/test/models/test_create_conference.py @@ -26,7 +26,7 @@ class TestCreateConference(unittest.TestCase): def setUp(self): self.model = CreateConference( - action_url="", + action_url="TS", ) def test_action_url(self): diff --git a/test/models/test_create_conference_request.py b/test/models/test_create_conference_request.py index 0eac36a..45a0910 100644 --- a/test/models/test_create_conference_request.py +++ b/test/models/test_create_conference_request.py @@ -29,6 +29,7 @@ def setUp(self): def test_alias(self): """Test CreateConferenceRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" diff --git a/test/models/test_create_conference_webhook.py b/test/models/test_create_conference_webhook.py index 020cf13..275b9d9 100644 --- a/test/models/test_create_conference_webhook.py +++ b/test/models/test_create_conference_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test CreateConferenceWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test CreateConferenceWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test CreateConferenceWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test CreateConferenceWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,11 +84,13 @@ def test_direction(self): def test_conference_id(self): """Test CreateConferenceWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test CreateConferenceWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" @@ -106,6 +112,7 @@ def test_recording_url(self): def test_recording_id(self): """Test CreateConferenceWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" diff --git a/test/models/test_create_web_rtc_token.py b/test/models/test_create_web_rtc_token.py index 98229f1..ace2933 100644 --- a/test/models/test_create_web_rtc_token.py +++ b/test/models/test_create_web_rtc_token.py @@ -26,18 +26,20 @@ class TestCreateWebRTCToken(unittest.TestCase): def setUp(self): self.model = CreateWebRTCToken( - to="", - var_from="", + to="TS", + var_from="TS", uses=1, ) def test_to(self): """Test CreateWebRTCToken.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_var_from(self): """Test CreateWebRTCToken.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" diff --git a/test/models/test_dequeue_webhook.py b/test/models/test_dequeue_webhook.py index 62c1e56..87ec861 100644 --- a/test/models/test_dequeue_webhook.py +++ b/test/models/test_dequeue_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test DequeueWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test DequeueWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test DequeueWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test DequeueWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test DequeueWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test DequeueWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_queue_result(self): """Test DequeueWebhook.queue_result""" + self.model.queue_result = "TEST_STRING" assert self.model.queue_result == "TEST_STRING" diff --git a/test/models/test_enqueue.py b/test/models/test_enqueue.py index 6a9bef7..16af9a5 100644 --- a/test/models/test_enqueue.py +++ b/test/models/test_enqueue.py @@ -26,9 +26,9 @@ class TestEnqueue(unittest.TestCase): def setUp(self): self.model = Enqueue( - action_url="", - queue_id="", - wait_url="", + action_url="TS", + queue_id="TS", + wait_url="TS", ) def test_action_url(self): @@ -43,6 +43,7 @@ def test_notification_url(self): def test_queue_id(self): """Test Enqueue.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" diff --git a/test/models/test_filter_logs_request.py b/test/models/test_filter_logs_request.py index 1a4b028..553bdfd 100644 --- a/test/models/test_filter_logs_request.py +++ b/test/models/test_filter_logs_request.py @@ -26,11 +26,12 @@ class TestFilterLogsRequest(unittest.TestCase): def setUp(self): self.model = FilterLogsRequest( - pql="", + pql="TS", ) def test_pql(self): """Test FilterLogsRequest.pql""" + self.model.pql = "TEST_STRING" assert self.model.pql == "TEST_STRING" diff --git a/test/models/test_get_digits.py b/test/models/test_get_digits.py index 0fc3410..cb9c170 100644 --- a/test/models/test_get_digits.py +++ b/test/models/test_get_digits.py @@ -26,7 +26,7 @@ class TestGetDigits(unittest.TestCase): def setUp(self): self.model = GetDigits( - action_url="", + action_url="TS", ) def test_action_url(self): @@ -41,6 +41,7 @@ def test_digit_timeout_ms(self): def test_finish_on_key(self): """Test GetDigits.finish_on_key""" + self.model.finish_on_key = "TEST_STRING" assert self.model.finish_on_key == "TEST_STRING" diff --git a/test/models/test_get_digits_webhook.py b/test/models/test_get_digits_webhook.py index dd964b7..0d52de5 100644 --- a/test/models/test_get_digits_webhook.py +++ b/test/models/test_get_digits_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test GetDigitsWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test GetDigitsWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test GetDigitsWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test GetDigitsWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test GetDigitsWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test GetDigitsWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_digits(self): """Test GetDigitsWebhook.digits""" + self.model.digits = "TEST_STRING" assert self.model.digits == "TEST_STRING" @@ -106,6 +113,7 @@ def test_reason(self): def test_parent_call_id(self): """Test GetDigitsWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_get_speech.py b/test/models/test_get_speech.py index 7f063eb..9c0034f 100644 --- a/test/models/test_get_speech.py +++ b/test/models/test_get_speech.py @@ -26,8 +26,8 @@ class TestGetSpeech(unittest.TestCase): def setUp(self): self.model = GetSpeech( - action_url="", - grammar_file="", + action_url="TS", + grammar_file="TS", ) def test_action_url(self): @@ -44,11 +44,13 @@ def test_grammar_type(self): def test_grammar_file(self): """Test GetSpeech.grammar_file""" + self.model.grammar_file = "TEST_STRING" assert self.model.grammar_file == "TEST_STRING" def test_grammar_rule(self): """Test GetSpeech.grammar_rule""" + self.model.grammar_rule = "TEST_STRING" assert self.model.grammar_rule == "TEST_STRING" diff --git a/test/models/test_get_speech_webhook.py b/test/models/test_get_speech_webhook.py index 6e3ddde..dc3e3c3 100644 --- a/test/models/test_get_speech_webhook.py +++ b/test/models/test_get_speech_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test GetSpeechWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test GetSpeechWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test GetSpeechWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test GetSpeechWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,11 +84,13 @@ def test_direction(self): def test_conference_id(self): """Test GetSpeechWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test GetSpeechWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" @@ -105,6 +111,7 @@ def test_reason(self): def test_recognition_result(self): """Test GetSpeechWebhook.recognition_result""" + self.model.recognition_result = "TEST_STRING" assert self.model.recognition_result == "TEST_STRING" @@ -115,16 +122,19 @@ def test_confidence(self): def test_parent_call_id(self): """Test GetSpeechWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" def test_completion_reason(self): """Test GetSpeechWebhook.completion_reason""" + self.model.completion_reason = "TEST_STRING" assert self.model.completion_reason == "TEST_STRING" def test_completion_cause(self): """Test GetSpeechWebhook.completion_cause""" + self.model.completion_cause = "TEST_STRING" assert self.model.completion_cause == "TEST_STRING" @@ -135,6 +145,7 @@ def test_mrcp_code(self): def test_mrcp_diagnostic(self): """Test GetSpeechWebhook.mrcp_diagnostic""" + self.model.mrcp_diagnostic = "TEST_STRING" assert self.model.mrcp_diagnostic == "TEST_STRING" diff --git a/test/models/test_hangup.py b/test/models/test_hangup.py index 626e410..ca63194 100644 --- a/test/models/test_hangup.py +++ b/test/models/test_hangup.py @@ -29,6 +29,7 @@ def setUp(self): def test_reason(self): """Test Hangup.reason""" + self.model.reason = "TEST_STRING" assert self.model.reason == "TEST_STRING" diff --git a/test/models/test_inbound_call_webhook.py b/test/models/test_inbound_call_webhook.py index fecc207..c7ceb50 100644 --- a/test/models/test_inbound_call_webhook.py +++ b/test/models/test_inbound_call_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test InboundCallWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test InboundCallWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test InboundCallWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test InboundCallWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test InboundCallWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test InboundCallWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_parent_call_id(self): """Test InboundCallWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_incoming_number_list.py b/test/models/test_incoming_number_list.py index 800efe2..05182bf 100644 --- a/test/models/test_incoming_number_list.py +++ b/test/models/test_incoming_number_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test IncomingNumberList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_incoming_number_request.py b/test/models/test_incoming_number_request.py index 20c7ee6..676033b 100644 --- a/test/models/test_incoming_number_request.py +++ b/test/models/test_incoming_number_request.py @@ -29,16 +29,19 @@ def setUp(self): def test_application_id(self): """Test IncomingNumberRequest.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" def test_alias(self): """Test IncomingNumberRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" def test_campaign_id(self): """Test IncomingNumberRequest.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" diff --git a/test/models/test_incoming_number_result.py b/test/models/test_incoming_number_result.py index d9bac49..c83353b 100644 --- a/test/models/test_incoming_number_result.py +++ b/test/models/test_incoming_number_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test IncomingNumberResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test IncomingNumberResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test IncomingNumberResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -61,41 +64,49 @@ def test_capabilities(self): def test_campaign_id(self): """Test IncomingNumberResult.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" def test_phone_number_id(self): """Test IncomingNumberResult.phone_number_id""" + self.model.phone_number_id = "TEST_STRING" assert self.model.phone_number_id == "TEST_STRING" def test_account_id(self): """Test IncomingNumberResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_application_id(self): """Test IncomingNumberResult.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" def test_phone_number(self): """Test IncomingNumberResult.phone_number""" + self.model.phone_number = "TEST_STRING" assert self.model.phone_number == "TEST_STRING" def test_alias(self): """Test IncomingNumberResult.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" def test_region(self): """Test IncomingNumberResult.region""" + self.model.region = "TEST_STRING" assert self.model.region == "TEST_STRING" def test_country(self): """Test IncomingNumberResult.country""" + self.model.country = "TEST_STRING" assert self.model.country == "TEST_STRING" diff --git a/test/models/test_leave_conference_webhook.py b/test/models/test_leave_conference_webhook.py index 0c5039f..b02dc05 100644 --- a/test/models/test_leave_conference_webhook.py +++ b/test/models/test_leave_conference_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test LeaveConferenceWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test LeaveConferenceWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test LeaveConferenceWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test LeaveConferenceWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,11 +84,13 @@ def test_direction(self): def test_conference_id(self): """Test LeaveConferenceWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test LeaveConferenceWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" diff --git a/test/models/test_log_list.py b/test/models/test_log_list.py index 1f01de0..4fdf3e5 100644 --- a/test/models/test_log_list.py +++ b/test/models/test_log_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test LogList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_log_result.py b/test/models/test_log_result.py index 3e609e4..65b6964 100644 --- a/test/models/test_log_result.py +++ b/test/models/test_log_result.py @@ -43,29 +43,33 @@ def test_level(self): def test_request_id(self): """Test LogResult.request_id""" + self.model.request_id = "TEST_STRING" assert self.model.request_id == "TEST_STRING" def test_account_id(self): """Test LogResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test LogResult.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_message(self): """Test LogResult.message""" + self.model.message = "TEST_STRING" assert self.model.message == "TEST_STRING" def test_metadata(self): """Test LogResult.metadata""" - testObject = {} - self.model.metadata = testObject - assert self.model.metadata == testObject + object = None + self.model.metadata = object + assert self.model.metadata == object if __name__ == "__main__": diff --git a/test/models/test_machine_detected_webhook.py b/test/models/test_machine_detected_webhook.py index ced684e..c13c06d 100644 --- a/test/models/test_machine_detected_webhook.py +++ b/test/models/test_machine_detected_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_call_id(self): """Test MachineDetectedWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_account_id(self): """Test MachineDetectedWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test MachineDetectedWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MachineDetectedWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test MachineDetectedWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test MachineDetectedWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_parent_call_id(self): """Test MachineDetectedWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_make_call_request.py b/test/models/test_make_call_request.py index 1d79327..454930a 100644 --- a/test/models/test_make_call_request.py +++ b/test/models/test_make_call_request.py @@ -26,32 +26,37 @@ class TestMakeCallRequest(unittest.TestCase): def setUp(self): self.model = MakeCallRequest( - var_from="", - to="", + var_from="TS", + to="TS", ) def test_var_from(self): """Test MakeCallRequest.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MakeCallRequest.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_application_id(self): """Test MakeCallRequest.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" def test_send_digits(self): """Test MakeCallRequest.send_digits""" + self.model.send_digits = "TEST_STRING" assert self.model.send_digits == "TEST_STRING" def test_if_machine(self): """Test MakeCallRequest.if_machine""" + self.model.if_machine = "TEST_STRING" assert self.model.if_machine == "TEST_STRING" @@ -67,6 +72,7 @@ def test_timeout(self): def test_parent_call_id(self): """Test MakeCallRequest.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_message_delivery_webhook.py b/test/models/test_message_delivery_webhook.py index 9e3dec1..c961852 100644 --- a/test/models/test_message_delivery_webhook.py +++ b/test/models/test_message_delivery_webhook.py @@ -32,46 +32,55 @@ def test_request_type(self): def test_account_id(self): """Test MessageDeliveryWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_var_from(self): """Test MessageDeliveryWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MessageDeliveryWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_text(self): """Test MessageDeliveryWebhook.text""" + self.model.text = "TEST_STRING" assert self.model.text == "TEST_STRING" def test_direction(self): """Test MessageDeliveryWebhook.direction""" + self.model.direction = "TEST_STRING" assert self.model.direction == "TEST_STRING" def test_application_id(self): """Test MessageDeliveryWebhook.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" def test_status(self): """Test MessageDeliveryWebhook.status""" + self.model.status = "TEST_STRING" assert self.model.status == "TEST_STRING" def test_phone_number_id(self): """Test MessageDeliveryWebhook.phone_number_id""" + self.model.phone_number_id = "TEST_STRING" assert self.model.phone_number_id == "TEST_STRING" def test_uri(self): """Test MessageDeliveryWebhook.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" diff --git a/test/models/test_message_request.py b/test/models/test_message_request.py index f1f21fa..1484bb0 100644 --- a/test/models/test_message_request.py +++ b/test/models/test_message_request.py @@ -26,23 +26,26 @@ class TestMessageRequest(unittest.TestCase): def setUp(self): self.model = MessageRequest( - var_from="", - to="", - text="", + var_from="TS", + to="TS", + text="TS", ) def test_uri(self): """Test MessageRequest.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test MessageRequest.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test MessageRequest.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -53,16 +56,19 @@ def test_revision(self): def test_var_from(self): """Test MessageRequest.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MessageRequest.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_text(self): """Test MessageRequest.text""" + self.model.text = "TEST_STRING" assert self.model.text == "TEST_STRING" diff --git a/test/models/test_message_result.py b/test/models/test_message_result.py index 84690bd..ac58ab6 100644 --- a/test/models/test_message_result.py +++ b/test/models/test_message_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test MessageResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test MessageResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test MessageResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,11 +52,13 @@ def test_revision(self): def test_account_id(self): """Test MessageResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_message_id(self): """Test MessageResult.message_id""" + self.model.message_id = "TEST_STRING" assert self.model.message_id == "TEST_STRING" @@ -84,21 +89,25 @@ def test_status(self): def test_var_from(self): """Test MessageResult.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MessageResult.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_text(self): """Test MessageResult.text""" + self.model.text = "TEST_STRING" assert self.model.text == "TEST_STRING" def test_direction(self): """Test MessageResult.direction""" + self.model.direction = "TEST_STRING" assert self.model.direction == "TEST_STRING" @@ -109,11 +118,13 @@ def test_notification_url(self): def test_brand_id(self): """Test MessageResult.brand_id""" + self.model.brand_id = "TEST_STRING" assert self.model.brand_id == "TEST_STRING" def test_campaign_id(self): """Test MessageResult.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" @@ -129,6 +140,26 @@ def test_media_urls(self): self.model.media_urls = testList assert self.model.media_urls == testList + def test_tfn(self): + """Test MessageResult.tfn""" + object = freeclimb.models.tfn.TFN( + campaign_id="", + ) + self.model.tfn = object + assert self.model.tfn == object + + def test_phone_number_id(self): + """Test MessageResult.phone_number_id""" + + self.model.phone_number_id = "TEST_STRING" + assert self.model.phone_number_id == "TEST_STRING" + + def test_application_id(self): + """Test MessageResult.application_id""" + + self.model.application_id = "TEST_STRING" + assert self.model.application_id == "TEST_STRING" + if __name__ == "__main__": unittest.main() diff --git a/test/models/test_message_status_webhook.py b/test/models/test_message_status_webhook.py index 645106e..6a23216 100644 --- a/test/models/test_message_status_webhook.py +++ b/test/models/test_message_status_webhook.py @@ -32,41 +32,49 @@ def test_request_type(self): def test_account_id(self): """Test MessageStatusWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_message_id(self): """Test MessageStatusWebhook.message_id""" + self.model.message_id = "TEST_STRING" assert self.model.message_id == "TEST_STRING" def test_call_id(self): """Test MessageStatusWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test MessageStatusWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test MessageStatusWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_text(self): """Test MessageStatusWebhook.text""" + self.model.text = "TEST_STRING" assert self.model.text == "TEST_STRING" def test_direction(self): """Test MessageStatusWebhook.direction""" + self.model.direction = "TEST_STRING" assert self.model.direction == "TEST_STRING" def test_application_id(self): """Test MessageStatusWebhook.application_id""" + self.model.application_id = "TEST_STRING" assert self.model.application_id == "TEST_STRING" @@ -97,6 +105,7 @@ def test_status(self): def test_phone_number_id(self): """Test MessageStatusWebhook.phone_number_id""" + self.model.phone_number_id = "TEST_STRING" assert self.model.phone_number_id == "TEST_STRING" diff --git a/test/models/test_messages_list.py b/test/models/test_messages_list.py index 5bde13b..fd45680 100644 --- a/test/models/test_messages_list.py +++ b/test/models/test_messages_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test MessagesList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_mutable_resource_model.py b/test/models/test_mutable_resource_model.py index 90081c2..9fa6d88 100644 --- a/test/models/test_mutable_resource_model.py +++ b/test/models/test_mutable_resource_model.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test MutableResourceModel.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test MutableResourceModel.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test MutableResourceModel.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" diff --git a/test/models/test_out_dial.py b/test/models/test_out_dial.py index 42a7dd7..8a319e8 100644 --- a/test/models/test_out_dial.py +++ b/test/models/test_out_dial.py @@ -26,10 +26,10 @@ class TestOutDial(unittest.TestCase): def setUp(self): self.model = OutDial( - action_url="", - call_connect_url="", - calling_number="", - destination="", + action_url="TS", + call_connect_url="TS", + calling_number="TS", + destination="TS", ) def test_action_url(self): @@ -44,11 +44,13 @@ def test_call_connect_url(self): def test_calling_number(self): """Test OutDial.calling_number""" + self.model.calling_number = "TEST_STRING" assert self.model.calling_number == "TEST_STRING" def test_destination(self): """Test OutDial.destination""" + self.model.destination = "TEST_STRING" assert self.model.destination == "TEST_STRING" @@ -66,6 +68,7 @@ def test_if_machine_url(self): def test_send_digits(self): """Test OutDial.send_digits""" + self.model.send_digits = "TEST_STRING" assert self.model.send_digits == "TEST_STRING" diff --git a/test/models/test_out_dial_api_connect_webhook.py b/test/models/test_out_dial_api_connect_webhook.py index 88eae8b..8d3033f 100644 --- a/test/models/test_out_dial_api_connect_webhook.py +++ b/test/models/test_out_dial_api_connect_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_account_id(self): """Test OutDialApiConnectWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test OutDialApiConnectWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test OutDialApiConnectWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test OutDialApiConnectWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test OutDialApiConnectWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test OutDialApiConnectWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_parent_call_id(self): """Test OutDialApiConnectWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_out_dial_connect_webhook.py b/test/models/test_out_dial_connect_webhook.py index 95db5b1..2646fe5 100644 --- a/test/models/test_out_dial_connect_webhook.py +++ b/test/models/test_out_dial_connect_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_account_id(self): """Test OutDialConnectWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test OutDialConnectWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test OutDialConnectWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test OutDialConnectWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test OutDialConnectWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test OutDialConnectWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_parent_call_id(self): """Test OutDialConnectWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_out_dial_start_webhook.py b/test/models/test_out_dial_start_webhook.py index 3e392a1..37e9f32 100644 --- a/test/models/test_out_dial_start_webhook.py +++ b/test/models/test_out_dial_start_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_account_id(self): """Test OutDialStartWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test OutDialStartWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test OutDialStartWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test OutDialStartWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,21 +84,25 @@ def test_direction(self): def test_conference_id(self): """Test OutDialStartWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test OutDialStartWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_dial_call_id(self): """Test OutDialStartWebhook.dial_call_id""" + self.model.dial_call_id = "TEST_STRING" assert self.model.dial_call_id == "TEST_STRING" def test_parent_call_id(self): """Test OutDialStartWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_pagination_model.py b/test/models/test_pagination_model.py index a805b69..9e88e95 100644 --- a/test/models/test_pagination_model.py +++ b/test/models/test_pagination_model.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test PaginationModel.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_park.py b/test/models/test_park.py index 22844cd..dc16b83 100644 --- a/test/models/test_park.py +++ b/test/models/test_park.py @@ -26,8 +26,8 @@ class TestPark(unittest.TestCase): def setUp(self): self.model = Park( - wait_url="", - action_url="", + wait_url="TS", + action_url="TS", ) def test_wait_url(self): diff --git a/test/models/test_play.py b/test/models/test_play.py index e06825c..8c320e2 100644 --- a/test/models/test_play.py +++ b/test/models/test_play.py @@ -26,11 +26,12 @@ class TestPlay(unittest.TestCase): def setUp(self): self.model = Play( - file="", + file="TS", ) def test_file(self): """Test Play.file""" + self.model.file = "TEST_STRING" assert self.model.file == "TEST_STRING" diff --git a/test/models/test_play_early_media.py b/test/models/test_play_early_media.py index b45f817..47d2df1 100644 --- a/test/models/test_play_early_media.py +++ b/test/models/test_play_early_media.py @@ -26,11 +26,12 @@ class TestPlayEarlyMedia(unittest.TestCase): def setUp(self): self.model = PlayEarlyMedia( - file="", + file="TS", ) def test_file(self): """Test PlayEarlyMedia.file""" + self.model.file = "TEST_STRING" assert self.model.file == "TEST_STRING" diff --git a/test/models/test_queue_list.py b/test/models/test_queue_list.py index 1fb3121..cad4b5d 100644 --- a/test/models/test_queue_list.py +++ b/test/models/test_queue_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test QueueList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_queue_member.py b/test/models/test_queue_member.py index 967b2ef..e2de7ae 100644 --- a/test/models/test_queue_member.py +++ b/test/models/test_queue_member.py @@ -29,11 +29,13 @@ def setUp(self): def test_uri(self): """Test QueueMember.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_call_id(self): """Test QueueMember.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" @@ -49,6 +51,7 @@ def test_position(self): def test_date_enqueued(self): """Test QueueMember.date_enqueued""" + self.model.date_enqueued = "TEST_STRING" assert self.model.date_enqueued == "TEST_STRING" diff --git a/test/models/test_queue_member_list.py b/test/models/test_queue_member_list.py index c930efb..1d3d85f 100644 --- a/test/models/test_queue_member_list.py +++ b/test/models/test_queue_member_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test QueueMemberList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_queue_request.py b/test/models/test_queue_request.py index c19a5b9..511ef21 100644 --- a/test/models/test_queue_request.py +++ b/test/models/test_queue_request.py @@ -29,6 +29,7 @@ def setUp(self): def test_alias(self): """Test QueueRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" diff --git a/test/models/test_queue_result.py b/test/models/test_queue_result.py index 99748db..e951c1b 100644 --- a/test/models/test_queue_result.py +++ b/test/models/test_queue_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test QueueResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test QueueResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test QueueResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,16 +52,19 @@ def test_revision(self): def test_account_id(self): """Test QueueResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_queue_id(self): """Test QueueResult.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_alias(self): """Test QueueResult.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING" @@ -79,9 +85,9 @@ def test_average_queue_removal_time(self): def test_subresource_uris(self): """Test QueueResult.subresource_uris""" - testObject = {} - self.model.subresource_uris = testObject - assert self.model.subresource_uris == testObject + object = None + self.model.subresource_uris = object + assert self.model.subresource_uris == object if __name__ == "__main__": diff --git a/test/models/test_queue_wait_webhook.py b/test/models/test_queue_wait_webhook.py index d0cd35e..ba9adae 100644 --- a/test/models/test_queue_wait_webhook.py +++ b/test/models/test_queue_wait_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_account_id(self): """Test QueueWaitWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test QueueWaitWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test QueueWaitWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test QueueWaitWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test QueueWaitWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test QueueWaitWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_queue_position(self): """Test QueueWaitWebhook.queue_position""" + self.model.queue_position = "TEST_STRING" assert self.model.queue_position == "TEST_STRING" diff --git a/test/models/test_record_utterance.py b/test/models/test_record_utterance.py index 31d2d9d..6d3f10d 100644 --- a/test/models/test_record_utterance.py +++ b/test/models/test_record_utterance.py @@ -26,7 +26,7 @@ class TestRecordUtterance(unittest.TestCase): def setUp(self): self.model = RecordUtterance( - action_url="", + action_url="TS", ) def test_action_url(self): @@ -41,6 +41,7 @@ def test_silence_timeout_ms(self): def test_finish_on_key(self): """Test RecordUtterance.finish_on_key""" + self.model.finish_on_key = "TEST_STRING" assert self.model.finish_on_key == "TEST_STRING" diff --git a/test/models/test_record_webhook.py b/test/models/test_record_webhook.py index ba7fa2e..21d9c4e 100644 --- a/test/models/test_record_webhook.py +++ b/test/models/test_record_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_account_id(self): """Test RecordWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test RecordWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test RecordWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test RecordWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test RecordWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test RecordWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_recording_id(self): """Test RecordWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" @@ -100,11 +107,13 @@ def test_recording_url(self): def test_recording_size(self): """Test RecordWebhook.recording_size""" + self.model.recording_size = "TEST_STRING" assert self.model.recording_size == "TEST_STRING" def test_recording_format(self): """Test RecordWebhook.recording_format""" + self.model.recording_format = "TEST_STRING" assert self.model.recording_format == "TEST_STRING" @@ -126,6 +135,7 @@ def test_term_reason(self): def test_parent_call_id(self): """Test RecordWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_recording_list.py b/test/models/test_recording_list.py index 8eb053f..56426d9 100644 --- a/test/models/test_recording_list.py +++ b/test/models/test_recording_list.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test RecordingList.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_recording_result.py b/test/models/test_recording_result.py index e1ec95a..e0ed9c6 100644 --- a/test/models/test_recording_result.py +++ b/test/models/test_recording_result.py @@ -29,16 +29,19 @@ def setUp(self): def test_uri(self): """Test RecordingResult.uri""" + self.model.uri = "TEST_STRING" assert self.model.uri == "TEST_STRING" def test_date_created(self): """Test RecordingResult.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test RecordingResult.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" @@ -49,16 +52,19 @@ def test_revision(self): def test_recording_id(self): """Test RecordingResult.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" def test_account_id(self): """Test RecordingResult.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test RecordingResult.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" @@ -69,6 +75,7 @@ def test_duration_sec(self): def test_conference_id(self): """Test RecordingResult.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" diff --git a/test/models/test_redirect.py b/test/models/test_redirect.py index f4b0a11..5119c4a 100644 --- a/test/models/test_redirect.py +++ b/test/models/test_redirect.py @@ -26,7 +26,7 @@ class TestRedirect(unittest.TestCase): def setUp(self): self.model = Redirect( - action_url="", + action_url="TS", ) def test_action_url(self): diff --git a/test/models/test_redirect_webhook.py b/test/models/test_redirect_webhook.py index 05e99dc..57c2f71 100644 --- a/test/models/test_redirect_webhook.py +++ b/test/models/test_redirect_webhook.py @@ -32,21 +32,25 @@ def test_request_type(self): def test_account_id(self): """Test RedirectWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test RedirectWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test RedirectWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test RedirectWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -80,16 +84,19 @@ def test_direction(self): def test_conference_id(self): """Test RedirectWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test RedirectWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" def test_parent_call_id(self): """Test RedirectWebhook.parent_call_id""" + self.model.parent_call_id = "TEST_STRING" assert self.model.parent_call_id == "TEST_STRING" diff --git a/test/models/test_reject.py b/test/models/test_reject.py index 91ee899..da24f54 100644 --- a/test/models/test_reject.py +++ b/test/models/test_reject.py @@ -29,6 +29,7 @@ def setUp(self): def test_reason(self): """Test Reject.reason""" + self.model.reason = "TEST_STRING" assert self.model.reason == "TEST_STRING" diff --git a/test/models/test_remove_from_queue_notification_webhook.py b/test/models/test_remove_from_queue_notification_webhook.py index d7027ec..3c0f909 100644 --- a/test/models/test_remove_from_queue_notification_webhook.py +++ b/test/models/test_remove_from_queue_notification_webhook.py @@ -34,21 +34,25 @@ def test_request_type(self): def test_account_id(self): """Test RemoveFromQueueNotificationWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test RemoveFromQueueNotificationWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test RemoveFromQueueNotificationWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test RemoveFromQueueNotificationWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" @@ -82,11 +86,13 @@ def test_direction(self): def test_conference_id(self): """Test RemoveFromQueueNotificationWebhook.conference_id""" + self.model.conference_id = "TEST_STRING" assert self.model.conference_id == "TEST_STRING" def test_queue_id(self): """Test RemoveFromQueueNotificationWebhook.queue_id""" + self.model.queue_id = "TEST_STRING" assert self.model.queue_id == "TEST_STRING" diff --git a/test/models/test_say.py b/test/models/test_say.py index 715539c..fc5e2b0 100644 --- a/test/models/test_say.py +++ b/test/models/test_say.py @@ -26,16 +26,18 @@ class TestSay(unittest.TestCase): def setUp(self): self.model = Say( - text="", + text="TS", ) def test_text(self): """Test Say.text""" + self.model.text = "TEST_STRING" assert self.model.text == "TEST_STRING" def test_language(self): """Test Say.language""" + self.model.language = "TEST_STRING" assert self.model.language == "TEST_STRING" diff --git a/test/models/test_send_digits.py b/test/models/test_send_digits.py index 15c398c..5ce1e5b 100644 --- a/test/models/test_send_digits.py +++ b/test/models/test_send_digits.py @@ -26,11 +26,12 @@ class TestSendDigits(unittest.TestCase): def setUp(self): self.model = SendDigits( - digits="", + digits="TS", ) def test_digits(self): """Test SendDigits.digits""" + self.model.digits = "TEST_STRING" assert self.model.digits == "TEST_STRING" diff --git a/test/models/test_sms.py b/test/models/test_sms.py index cdb830d..e9693d2 100644 --- a/test/models/test_sms.py +++ b/test/models/test_sms.py @@ -26,23 +26,26 @@ class TestSms(unittest.TestCase): def setUp(self): self.model = Sms( - to="", - var_from="", - text="", + to="TS", + var_from="TS", + text="TS", ) def test_to(self): """Test Sms.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_var_from(self): """Test Sms.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_text(self): """Test Sms.text""" + self.model.text = "TEST_STRING" assert self.model.text == "TEST_STRING" diff --git a/test/models/test_sms_ten_dlc_brand.py b/test/models/test_sms_ten_dlc_brand.py index 360036c..565f9b9 100644 --- a/test/models/test_sms_ten_dlc_brand.py +++ b/test/models/test_sms_ten_dlc_brand.py @@ -27,18 +27,19 @@ class TestSMSTenDLCBrand(unittest.TestCase): def setUp(self): self.model = SMSTenDLCBrand( entity_type=SMSTenDLCBrandEntityType.PRIVATE_PROFIT, - display_name="", - phone="", - country="", - email="", + display_name="TS", + phone="TS", + country="TS", + email="TS", brand_relationship=SMSTenDLCBrandRelationship.BASIC_ACCOUNT, - vertical="", + vertical="TS", mock=True, identity_status=SMSTenDLCBrandIdentityStatus.SELF_DECLARED, ) def test_account_id(self): """Test SMSTenDLCBrand.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" @@ -57,11 +58,13 @@ def test_entity_type(self): def test_csp_id(self): """Test SMSTenDLCBrand.csp_id""" + self.model.csp_id = "TEST_STRING" assert self.model.csp_id == "TEST_STRING" def test_brand_id(self): """Test SMSTenDLCBrand.brand_id""" + self.model.brand_id = "TEST_STRING" assert self.model.brand_id == "TEST_STRING" @@ -294,6 +297,7 @@ def test_alt_business_id_type(self): def test_universal_ein(self): """Test SMSTenDLCBrand.universal_ein""" + self.model.universal_ein = "TEST_STRING" assert self.model.universal_ein == "TEST_STRING" @@ -307,8 +311,9 @@ def test_reference_id(self): def test_optional_attributes(self): """Test SMSTenDLCBrand.optional_attributes""" - self.model.optional_attributes = {} - assert self.model.optional_attributes == {} + object = {} + self.model.optional_attributes = object + assert self.model.optional_attributes == object def test_mock(self): """Test SMSTenDLCBrand.mock""" diff --git a/test/models/test_sms_ten_dlc_brands_list_result.py b/test/models/test_sms_ten_dlc_brands_list_result.py index 955c1e1..15cd832 100644 --- a/test/models/test_sms_ten_dlc_brands_list_result.py +++ b/test/models/test_sms_ten_dlc_brands_list_result.py @@ -59,6 +59,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test SMSTenDLCBrandsListResult.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_sms_ten_dlc_campaign.py b/test/models/test_sms_ten_dlc_campaign.py index ee4bfd5..74e1a82 100644 --- a/test/models/test_sms_ten_dlc_campaign.py +++ b/test/models/test_sms_ten_dlc_campaign.py @@ -26,27 +26,30 @@ class TestSMSTenDLCCampaign(unittest.TestCase): def setUp(self): self.model = SMSTenDLCCampaign( - campaign_id="", - csp_id="", - brand_id="", - usecase="", + campaign_id="TS", + csp_id="TS", + brand_id="TS", + usecase="TS", sub_usecases=[], - description="", + description="TS", mock=True, ) def test_account_id(self): """Test SMSTenDLCCampaign.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_campaign_id(self): """Test SMSTenDLCCampaign.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" def test_csp_id(self): """Test SMSTenDLCCampaign.csp_id""" + self.model.csp_id = "TEST_STRING" assert self.model.csp_id == "TEST_STRING" diff --git a/test/models/test_sms_ten_dlc_campaigns_list_result.py b/test/models/test_sms_ten_dlc_campaigns_list_result.py index f007903..3728ed2 100644 --- a/test/models/test_sms_ten_dlc_campaigns_list_result.py +++ b/test/models/test_sms_ten_dlc_campaigns_list_result.py @@ -61,6 +61,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test SMSTenDLCCampaignsListResult.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_sms_ten_dlc_partner_campaign.py b/test/models/test_sms_ten_dlc_partner_campaign.py index bb3e5aa..91294bd 100644 --- a/test/models/test_sms_ten_dlc_partner_campaign.py +++ b/test/models/test_sms_ten_dlc_partner_campaign.py @@ -26,19 +26,21 @@ class TestSMSTenDLCPartnerCampaign(unittest.TestCase): def setUp(self): self.model = SMSTenDLCPartnerCampaign( - campaign_id="", - brand_id="", - usecase="", - description="", + campaign_id="TS", + brand_id="TS", + usecase="TS", + description="TS", ) def test_account_id(self): """Test SMSTenDLCPartnerCampaign.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_campaign_id(self): """Test SMSTenDLCPartnerCampaign.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" diff --git a/test/models/test_sms_ten_dlc_partner_campaign_brand.py b/test/models/test_sms_ten_dlc_partner_campaign_brand.py index ff02165..7c5a2e4 100644 --- a/test/models/test_sms_ten_dlc_partner_campaign_brand.py +++ b/test/models/test_sms_ten_dlc_partner_campaign_brand.py @@ -28,17 +28,19 @@ class TestSMSTenDLCPartnerCampaignBrand(unittest.TestCase): def setUp(self): self.model = SMSTenDLCPartnerCampaignBrand( - phone="", - email="", + phone="TS", + email="TS", ) def test_account_id(self): """Test SMSTenDLCPartnerCampaignBrand.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_brand_id(self): """Test SMSTenDLCPartnerCampaignBrand.brand_id""" + self.model.brand_id = "TEST_STRING" assert self.model.brand_id == "TEST_STRING" @@ -100,8 +102,9 @@ def test_website(self): def test_optional_attributes(self): """Test SMSTenDLCPartnerCampaignBrand.optional_attributes""" - self.model.optional_attributes = {} - assert self.model.optional_attributes == {} + object = {} + self.model.optional_attributes = object + assert self.model.optional_attributes == object def test_evp_vetting_score(self): """Test SMSTenDLCPartnerCampaignBrand.evp_vetting_score""" diff --git a/test/models/test_sms_ten_dlc_partner_campaigns_list_result.py b/test/models/test_sms_ten_dlc_partner_campaigns_list_result.py index 669a6f5..325d158 100644 --- a/test/models/test_sms_ten_dlc_partner_campaigns_list_result.py +++ b/test/models/test_sms_ten_dlc_partner_campaigns_list_result.py @@ -61,6 +61,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test SMSTenDLCPartnerCampaignsListResult.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_sms_toll_free_campaign.py b/test/models/test_sms_toll_free_campaign.py index dbc50e9..938b7d9 100644 --- a/test/models/test_sms_toll_free_campaign.py +++ b/test/models/test_sms_toll_free_campaign.py @@ -26,27 +26,30 @@ class TestSMSTollFreeCampaign(unittest.TestCase): def setUp(self): self.model = SMSTollFreeCampaign( - account_id="", - campaign_id="", - use_case="", + account_id="TS", + campaign_id="TS", + use_case="TS", registration_status=SMSTollFreeCampaignRegistrationStatus.UNREGISTERED, - date_created="", - date_updated="", + date_created="TS", + date_updated="TS", revision=1, ) def test_account_id(self): """Test SMSTollFreeCampaign.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_campaign_id(self): """Test SMSTollFreeCampaign.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" def test_use_case(self): """Test SMSTollFreeCampaign.use_case""" + self.model.use_case = "TEST_STRING" assert self.model.use_case == "TEST_STRING" @@ -84,11 +87,13 @@ def test_registration_status(self): def test_date_created(self): """Test SMSTollFreeCampaign.date_created""" + self.model.date_created = "TEST_STRING" assert self.model.date_created == "TEST_STRING" def test_date_updated(self): """Test SMSTollFreeCampaign.date_updated""" + self.model.date_updated = "TEST_STRING" assert self.model.date_updated == "TEST_STRING" diff --git a/test/models/test_sms_toll_free_campaigns_list_result.py b/test/models/test_sms_toll_free_campaigns_list_result.py index ee6dc69..4a7198e 100644 --- a/test/models/test_sms_toll_free_campaigns_list_result.py +++ b/test/models/test_sms_toll_free_campaigns_list_result.py @@ -61,6 +61,7 @@ def test_page_size(self): def test_next_page_uri(self): """Test SMSTollFreeCampaignsListResult.next_page_uri""" + self.model.next_page_uri = "TEST_STRING" assert self.model.next_page_uri == "TEST_STRING" diff --git a/test/models/test_tfn.py b/test/models/test_tfn.py index ae324ae..94c61b2 100644 --- a/test/models/test_tfn.py +++ b/test/models/test_tfn.py @@ -26,11 +26,12 @@ class TestTFN(unittest.TestCase): def setUp(self): self.model = TFN( - campaign_id="", + campaign_id="TS", ) def test_campaign_id(self): """Test TFN.campaign_id""" + self.model.campaign_id = "TEST_STRING" assert self.model.campaign_id == "TEST_STRING" diff --git a/test/models/test_tfn_campaign.py b/test/models/test_tfn_campaign.py new file mode 100644 index 0000000..3237ded --- /dev/null +++ b/test/models/test_tfn_campaign.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.tfn_campaign import TFNCampaign + + +class TestTFNCampaign(unittest.TestCase): + """TFNCampaign unit test stubs""" + + def setUp(self): + self.model = TFNCampaign( + account_id="TS", + campaign_id="cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a", + use_case="TS", + registration_status=SMSTollFreeCampaignRegistrationStatus.UNREGISTERED, + date_created="TS", + date_updated="TS", + date_created_iso="TS", + date_updated_iso="TS", + revision=1, + ) + + def test_account_id(self): + """Test TFNCampaign.account_id""" + + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_campaign_id(self): + """Test TFNCampaign.campaign_id""" + + self.model.campaign_id = "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a" + assert ( + self.model.campaign_id == "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a" + ) + + def test_use_case(self): + """Test TFNCampaign.use_case""" + + self.model.use_case = "TEST_STRING" + assert self.model.use_case == "TEST_STRING" + + def test_registration_status(self): + """Test TFNCampaign.registration_status""" + self.model.registration_status = ( + SMSTollFreeCampaignRegistrationStatus.UNREGISTERED + ) + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.UNREGISTERED + ) + self.model.registration_status = SMSTollFreeCampaignRegistrationStatus.INITIATED + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.INITIATED + ) + self.model.registration_status = SMSTollFreeCampaignRegistrationStatus.PENDING + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.PENDING + ) + self.model.registration_status = SMSTollFreeCampaignRegistrationStatus.DECLINED + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.DECLINED + ) + self.model.registration_status = ( + SMSTollFreeCampaignRegistrationStatus.REGISTERED + ) + assert ( + self.model.registration_status + == SMSTollFreeCampaignRegistrationStatus.REGISTERED + ) + + def test_date_created(self): + """Test TFNCampaign.date_created""" + + self.model.date_created = "TEST_STRING" + assert self.model.date_created == "TEST_STRING" + + def test_date_updated(self): + """Test TFNCampaign.date_updated""" + + self.model.date_updated = "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" + + def test_date_created_iso(self): + """Test TFNCampaign.date_created_iso""" + + self.model.date_created_iso = "TEST_STRING" + assert self.model.date_created_iso == "TEST_STRING" + + def test_date_updated_iso(self): + """Test TFNCampaign.date_updated_iso""" + + self.model.date_updated_iso = "TEST_STRING" + assert self.model.date_updated_iso == "TEST_STRING" + + def test_revision(self): + """Test TFNCampaign.revision""" + self.model.revision = 1 + assert self.model.revision == 1 + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_transcribe_utterance.py b/test/models/test_transcribe_utterance.py index 1d65e41..c79b62f 100644 --- a/test/models/test_transcribe_utterance.py +++ b/test/models/test_transcribe_utterance.py @@ -26,7 +26,7 @@ class TestTranscribeUtterance(unittest.TestCase): def setUp(self): self.model = TranscribeUtterance( - action_url="", + action_url="TS", ) def test_action_url(self): diff --git a/test/models/test_transcribe_webhook.py b/test/models/test_transcribe_webhook.py index 08518e0..d653d16 100644 --- a/test/models/test_transcribe_webhook.py +++ b/test/models/test_transcribe_webhook.py @@ -32,26 +32,31 @@ def test_request_type(self): def test_account_id(self): """Test TranscribeWebhook.account_id""" + self.model.account_id = "TEST_STRING" assert self.model.account_id == "TEST_STRING" def test_call_id(self): """Test TranscribeWebhook.call_id""" + self.model.call_id = "TEST_STRING" assert self.model.call_id == "TEST_STRING" def test_var_from(self): """Test TranscribeWebhook.var_from""" + self.model.var_from = "TEST_STRING" assert self.model.var_from == "TEST_STRING" def test_to(self): """Test TranscribeWebhook.to""" + self.model.to = "TEST_STRING" assert self.model.to == "TEST_STRING" def test_recording_id(self): """Test TranscribeWebhook.recording_id""" + self.model.recording_id = "TEST_STRING" assert self.model.recording_id == "TEST_STRING" @@ -67,6 +72,7 @@ def test_recording_size(self): def test_recording_format(self): """Test TranscribeWebhook.recording_format""" + self.model.recording_format = "TEST_STRING" assert self.model.recording_format == "TEST_STRING" @@ -95,6 +101,7 @@ def test_record_term_reason(self): def test_digit(self): """Test TranscribeWebhook.digit""" + self.model.digit = "TEST_STRING" assert self.model.digit == "TEST_STRING" @@ -139,6 +146,7 @@ def test_barge_in_time_ms(self): def test_transcript(self): """Test TranscribeWebhook.transcript""" + self.model.transcript = "TEST_STRING" assert self.model.transcript == "TEST_STRING" diff --git a/test/models/test_update_conference_request.py b/test/models/test_update_conference_request.py index b0bcb00..e1074b7 100644 --- a/test/models/test_update_conference_request.py +++ b/test/models/test_update_conference_request.py @@ -29,6 +29,7 @@ def setUp(self): def test_alias(self): """Test UpdateConferenceRequest.alias""" + self.model.alias = "TEST_STRING" assert self.model.alias == "TEST_STRING"