Skip to content

Commit

Permalink
Do not use pendulum
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Sep 11, 2024
1 parent 7a7715f commit c749531
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import decimal
import json

import pendulum
import pytest
import sqlalchemy as sa
from faker import Faker
Expand All @@ -28,12 +27,12 @@
)

SAMPLE_CONFIG = {
"start_date": pendulum.datetime(2022, 11, 1).to_iso8601_string(),
"start_date": datetime.datetime(2022, 11, 1).isoformat(),
"sqlalchemy_url": DB_SQLALCHEMY_URL,
}

NO_SQLALCHEMY_CONFIG = {
"start_date": pendulum.datetime(2022, 11, 1).to_iso8601_string(),
"start_date": datetime.datetime(2022, 11, 1).isoformat(),
"host": "localhost",
"port": 5432,
"user": "postgres",
Expand Down
12 changes: 6 additions & 6 deletions tests/test_replication_key.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Tests standard tap features using the built-in SDK tests library."""

import copy
import datetime
import json

import pendulum
import sqlalchemy as sa
from singer_sdk.testing.runners import TapTestRunner
from singer_sdk.testing.templates import TapTestTemplate
Expand All @@ -14,7 +14,7 @@

TABLE_NAME = "test_replication_key"
SAMPLE_CONFIG = {
"start_date": pendulum.datetime(2022, 11, 1).to_iso8601_string(),
"start_date": datetime.datetime(2022, 11, 1).isoformat(),
"sqlalchemy_url": DB_SQLALCHEMY_URL,
}

Expand Down Expand Up @@ -68,11 +68,11 @@ def test_null_replication_key_with_start_date():
table.drop(conn, checkfirst=True)
metadata_obj.create_all(conn)
insert = table.insert().values(
data="Alpha", updated_at=pendulum.datetime(2022, 10, 20).to_iso8601_string()
data="Alpha", updated_at=datetime.datetime(2022, 10, 20).isoformat()
)
conn.execute(insert)
insert = table.insert().values(
data="Bravo", updated_at=pendulum.datetime(2022, 11, 20).to_iso8601_string()
data="Bravo", updated_at=datetime.datetime(2022, 11, 20).isoformat()
)
conn.execute(insert)
insert = table.insert().values(data="Zulu", updated_at=None)
Expand Down Expand Up @@ -124,11 +124,11 @@ def test_null_replication_key_without_start_date():
table.drop(conn, checkfirst=True)
metadata_obj.create_all(conn)
insert = table.insert().values(
data="Alpha", updated_at=pendulum.datetime(2022, 10, 20).to_iso8601_string()
data="Alpha", updated_at=datetime.datetime(2022, 10, 20).isoformat()
)
conn.execute(insert)
insert = table.insert().values(
data="Bravo", updated_at=pendulum.datetime(2022, 11, 20).to_iso8601_string()
data="Bravo", updated_at=datetime.datetime(2022, 11, 20).isoformat()
)
conn.execute(insert)
insert = table.insert().values(data="Zulu", updated_at=None)
Expand Down

0 comments on commit c749531

Please sign in to comment.