Skip to content

Commit

Permalink
feat: telegram added name for the platform names creation!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Oct 21, 2024
1 parent ccf7d08 commit e72bff7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def create_platform(self) -> ObjectId:
community_id = ObjectId()
self._client[self.database][self.collection].insert_one(
{
"name": "telegram",
"metadata": {
"id": self.chat_id,
"name": self.chat_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def setUp(self) -> None:
self.telegram_platform.database = "TempPlatforms"
self.client.drop_database(self.telegram_platform.database)

def tearDown(self) -> None:
self.client.drop_database(self.telegram_platform.database)

def test_check_no_platform_available(self):
result = self.telegram_platform.check_platform_existence()
self.assertFalse(result)
Expand All @@ -29,6 +32,7 @@ def test_single_platform_available(self):
self.telegram_platform.collection
].insert_one(
{
"name": "telegram",
"metadata": {
"id": self.chat_id,
"name": self.chat_name,
Expand All @@ -55,6 +59,7 @@ def test_telegram_multiple_platform_not_available(self):
].insert_many(
[
{
"name": "telegram",
"metadata": {
"id": chat_id,
"name": chat_name,
Expand All @@ -65,6 +70,7 @@ def test_telegram_multiple_platform_not_available(self):
"updatedAt": datetime.now(),
},
{
"name": "telegram",
"metadata": {
"id": chat_id2,
"name": chat_name2,
Expand All @@ -75,6 +81,7 @@ def test_telegram_multiple_platform_not_available(self):
"updatedAt": datetime.now(),
},
{
"name": "telegram",
"metadata": {
"id": chat_id3,
"name": chat_name3,
Expand Down

0 comments on commit e72bff7

Please sign in to comment.