-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed audio tool, moved drive in utils folder, added pytest to cale…
…ndar
- Loading branch information
1 parent
e1f7338
commit 0979119
Showing
21 changed files
with
117 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from sayvai_tools.tools.TTS.tool import VoiceOutputRun | ||
|
||
__all__ = ["VoiceOutputRun"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from sayvai_tools.tools.retrive_details.retrive_email.tool import RetrieveEmail | ||
from sayvai_tools.tools.retrive_details.retrive_phone.tool import RetrievePhone | ||
|
||
__all__ = ["RetrieveEmail", | ||
"RetrievePhone"] |
1 change: 1 addition & 0 deletions
1
src/sayvai_tools/tools/retrive_details/retrive_email/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__all__ = ["RetrieveEmail"] |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/sayvai_tools/tools/retrive_details/retrive_phone/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__all__ = ["RetrievePhone"] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def correct_parameters(): | ||
return { | ||
"scope": "https://www.googleapis.com/auth/calendar", | ||
"email": "info@sayvai.io", | ||
"summary": "sample test calendar", | ||
"date": "2023, 10, 4, 16, 00/2023, 10, 4, 16, 59/9629076714/SriDhanush", | ||
} | ||
|
||
|
||
@pytest.fixture | ||
def incorrect_parameters(): | ||
return { | ||
"scope": "https://www.googleapis.com/auth/calendar", | ||
"email": "info@sayvai.io", | ||
"summary": "sample test calendar", | ||
"date": "2023, 10, 4, 16, 00/2023, 10, 4, 16, 59/SriDhanush", | ||
} | ||
|
||
|
||
@pytest.fixture | ||
def past_date(): | ||
return { | ||
"scope": "https://www.googleapis.com/auth/calendar", | ||
"email": "info@sayvai.io", | ||
"summary": "sample test calendar", | ||
"date": "2023, 10, 4, 16, 00/2023, 10, 4, 16, 59/9629076714/SriDhanush", | ||
} | ||
|
||
|
||
@pytest.fixture | ||
def past_time(): | ||
return { | ||
"scope": "https://www.googleapis.com/auth/calendar", | ||
"email": "info@sayvai.io", | ||
"summary": "sample test calendar", | ||
"date": "2023, 12, 4, 16, 00/2023, 12, 4, 13, 59/9629076714/SriDhanush", | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import pytest | ||
from typing import Tuple, List, Dict, Any, Text, Optional | ||
from sayvai_tools.tools.calendar.calendar import Calendar | ||
|
||
|
||
def test_positive(correct_parameters: Dict[str, Any]): | ||
scope = correct_parameters["scope"] | ||
email = correct_parameters["email"] | ||
summary = correct_parameters["summary"] | ||
date = correct_parameters["date"] | ||
cal = Calendar(scope=scope, email=email, summary=summary) | ||
assert cal._run(date) | ||
|
||
|
||
def test_incorrect(incorrect_parameters: Dict[str, Any]): | ||
scope = incorrect_parameters["scope"] | ||
email = incorrect_parameters["email"] | ||
summary = incorrect_parameters["summary"] | ||
date = incorrect_parameters["date"] | ||
cal = Calendar(scope=scope, email=email, summary=summary) | ||
with pytest.raises(Exception): | ||
cal._run(date) | ||
|
||
|
||
def test_past_date(past_date: Dict[str, Any]): | ||
scope = past_date["scope"] | ||
email = past_date["email"] | ||
summary = past_date["summary"] | ||
date = past_date["date"] | ||
cal = Calendar(scope=scope, email=email, summary=summary) | ||
assert cal._run(date) == "The provided date and time are in the past." | ||
|
||
|
||
def test_time(past_time: Dict[str, Any]): | ||
scope = past_time["scope"] | ||
email = past_time["email"] | ||
summary = past_time["summary"] | ||
date = past_time["date"] | ||
cal = Calendar(scope=scope, email=email, summary=summary) | ||
assert cal._run(date) == "End time should be greater than start time." |