Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-client / astakosclient / tests.py @ f74d2b69

History | View | Annotate | Download (22.3 kB)

# Date Author Comment
f74d2b69 03/22/2013 11:27 am Ilias Tsitsimpis

Rename AstakosClient's authenticate method to getUserInfo

2377e7c2 03/20/2013 12:58 pm Ilias Tsitsimpis

Add 2 new exceptions to AstakosClient

  • NoDisplayName
    raised if getDisplayName called with non-existing uuid
  • NoUUID
    raised if getUUID called with non-existing display_name
66208bc7 03/12/2013 03:54 pm Ilias Tsitsimpis

Correct unit tests to run with AstakosClient class

864eb390 03/12/2013 03:54 pm Ilias Tsitsimpis

TestAuthenticate now works with AstakosClient

d4789cd4 03/12/2013 03:54 pm Ilias Tsitsimpis

Implement unit tests for getDisplayNmaes

98752f06 03/12/2013 03:54 pm Ilias Tsitsimpis

Move token argument

Remove token argument from class initialization
method and make it a mandatory argument to all
the other class methods.

aaf0a42c 03/12/2013 03:54 pm Ilias Tsitsimpis

Implement getUUIDs/getUUID methods

8fe6475a 03/12/2013 03:54 pm Ilias Tsitsimpis

Create more Exception Classes for AstakosClient

  • AstakosClientEInvalid:
    Invalid X-Auth-Token, 401
  • AstakosClientEMethod:
    Method not allowed, 400
  • AstakosClientENotFound:
    Not Found, 404
f93cc364 03/12/2013 03:54 pm Ilias Tsitsimpis

Create utils and errors modules for astakosclient

  • Move retry decorator to utils module.
  • Rename exceptions to be more intuitive.
  • Add 403 Forbidden exception.
  • Move exceptions to errors class
57ba2dfc 03/12/2013 03:54 pm Ilias Tsitsimpis

Implement the mocked _doRequest for unit testing

When unit testing our astakos-client module we have to
replace it's _doRequest function with some dummy ones.
In this commit we create this dummy functions that are
going to be used through our tests.

bc56a641 03/12/2013 03:54 pm Ilias Tsitsimpis

First test for _callAstakos, raise socket error

The first unit test for _callAstakos function, checks
the answer when there is no internet connection
(should raise a socket exception).

b2a2fe7a 03/12/2013 03:54 pm Ilias Tsitsimpis

Add more unit tests for _callAstakos function

454a1ad4 03/12/2013 03:54 pm Ilias Tsitsimpis

Add unit tests for `authenticate' function

344d5c90 03/12/2013 03:54 pm Ilias Tsitsimpis

In unit tests change user info from string to dict

d071e6f1 03/12/2013 03:54 pm Ilias Tsitsimpis

Unit test user_catalogs without POST method