Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gtalarico committed Jul 27, 2021
1 parent 96bca57 commit 7809bc8
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test:
## lint: Lint and format
lint:
flake8 .
black --check .
black --diff .

## docs: Generate docs locally
docs:
Expand Down
1 change: 0 additions & 1 deletion airtable/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@

from typing import List
import requests
from collections import OrderedDict
from functools import lru_cache
import posixpath
import time
Expand Down
2 changes: 1 addition & 1 deletion airtable/orm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from airtable import Table
from typing import TypeVar, Type, Generic, Optional, Tuple
from typing import TypeVar, Type, Optional, Tuple

from .fields import Field

Expand Down
1 change: 0 additions & 1 deletion airtable/orm/fields.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import abc
from typing import Any, TypeVar, Type, Generic, Optional, TYPE_CHECKING

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
author_email=about["__authoremail__"],
url=about["__url__"],
version=about["__version__"],
packages=["airtable"],
packages=["airtable", "airtable.api", "airtable.orm"],
setup_requires=setup_requires,
install_requires=install_requires,
tests_require=tests_require,
Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from airtable.api.api import AirtableApi
import pytest
from collections import OrderedDict
from posixpath import join as urljoin

from posixpath import join as urljoin
from requests import HTTPError
from urllib.parse import urlencode, quote
from mock import Mock

from airtable.api import AirtableApi, Table
from collections import OrderedDict


@pytest.fixture
Expand Down
10 changes: 3 additions & 7 deletions tests/integration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import os
from airtable import Base, Table
from airtable.orm import Model
from airtable.orm import fields as f
from airtable.formulas import AND, EQUAL, FIELD, STR_VALUE

base_id = "appaPqizdsNHDvlEm"
table_name = "table"
Expand Down Expand Up @@ -63,10 +66,6 @@
assert len(records) == 15


from airtable.orm import Model
from airtable.orm import fields as f


class Address(Model):
street = f.TextField("Street")
number = f.TextField("Number")
Expand Down Expand Up @@ -116,9 +115,6 @@ class Meta:
print(address.to_record())


from airtable.formulas import AND, EQUAL, FIELD, STR_VALUE


table = Table(base_id, "Contact", os.environ["AIRTABLE_API_KEY"])

# formula = EQUAL("{First Name}", "'A'")
Expand Down
1 change: 0 additions & 1 deletion tests/test_api_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from posixpath import join as urljoin
from requests import Request
from requests_mock import Mocker
from urllib.parse import urlencode

from airtable import Table

Expand Down
1 change: 0 additions & 1 deletion tests/test_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import requests
from requests_mock import Mocker

from airtable.api import Table
from airtable.api.params import (
to_params_dict,
dict_list_to_request_params,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ commands = pytest
python = python3.7
commands =
black --diff airtable tests
flake8
flake8 .

0 comments on commit 7809bc8

Please sign in to comment.