Skip to content

Commit

Permalink
cleanup and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nanorepublica committed Jan 28, 2016
1 parent 461b1ad commit d6eefa0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
4 changes: 0 additions & 4 deletions duedil/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
from ..api import LiteClient, ProClient # , InternationalClient


class ReadOnlyException(Exception):
pass


class Resource(Mapping):
attribute_names = None
locale = 'uk'
Expand Down
4 changes: 0 additions & 4 deletions duedil/resources/pro/company/accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
import sys


class UnknownAccountTypeException(Exception):
pass


class Account(RelatedResourceMixin, ProResource):
'Abstraction of Accounts resource in duedil v3 pro api'
attribute_names = [
Expand Down
7 changes: 4 additions & 3 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import requests_mock
from requests.exceptions import HTTPError

from duedil.api import LiteClient, ProClient, InternationalClient, Client
from duedil.api import LiteClient, ProClient, InternationalClient, Client, APIMonthlyLimitException
from duedil.resources.lite import Company as LiteCompany
from duedil.search.pro import CompanySearchResult as ProCompanySearchResult, DirectorSearchResult
from duedil.search.lite import CompanySearchResult as LiteCompanySearchResult
Expand Down Expand Up @@ -131,8 +131,9 @@ def test_throttling_quota(self, m):
{'status_code': 200, 'json': {'name': 'Duedil', 'id': '12345'}},
])
data = {'name': 'Duedil', 'id': '12345'}
response = client.get('12345')
self.assertEqual(response, {'name': 'Duedil', 'id': '12345'})
with self.assertRaises(APIMonthlyLimitException):
response = client.get('12345')
self.assertIsNone(response)


def test_incorrect_query_params(self):
Expand Down

0 comments on commit d6eefa0

Please sign in to comment.