Skip to content

Commit

Permalink
Add e2e test for repro, fix formula.py newline
Browse files Browse the repository at this point in the history
  • Loading branch information
gtalarico committed Apr 20, 2022
1 parent be1b5c4 commit 88f7fc8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ docs/build
coverage.xml
.coverage
test.py
pip-wheel-metadata
25 changes: 25 additions & 0 deletions e2e/write.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
End-to-end tests against
https://airtable.com/appaPqizdsNHDvlEm/tblfbOcVkVnnKxurq/viwhi8Qtuw2psSdGG?blocks=hide
"""

import os
from datetime import datetime
from pyairtable import Table
from pyairtable.utils import datetime_to_iso_str, date_to_iso_str

apikey = os.environ["AIRTABLE_KEY"]
base_id = "appaPqizdsNHDvlEm"
table_name = "TEST_TABLE"
table = Table(apikey, base_id, table_name)

table.create(
{
"text": "Some Text",
"number": 5,
"boolean": True,
"phone": "540-123-4567",
"date": date_to_iso_str(datetime.now()),
"datetime": datetime_to_iso_str(datetime.now()),
}
)
2 changes: 1 addition & 1 deletion pyairtable/formulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ def OR(*args) -> str:
>>> OR(1, 2, 3)
'OR(1, 2, 3)'
"""
return "OR({})".format(",".join(args))
return "OR({})".format(",".join(args))

0 comments on commit 88f7fc8

Please sign in to comment.