Skip to content

Commit

Permalink
#250: Add test class for ICATClient
Browse files Browse the repository at this point in the history
- Class used to create object pools of Python ICAT's client class
  • Loading branch information
MRichards99 committed Aug 13, 2021
1 parent 01cb60c commit 9e0977d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/icat/test_icat_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from icat.client import Client

from datagateway_api.common.icat.icat_client_pool import ICATClient


class TestICATClient:
def test_init(self):
test_icat_client = ICATClient()
assert isinstance(test_icat_client, Client)

assert not test_icat_client.autoLogout

def test_clean_up(self):
test_icat_client = ICATClient()
assert id(test_icat_client) in Client.Register
test_icat_client.clean_up()
assert id(test_icat_client) not in Client.Register

0 comments on commit 9e0977d

Please sign in to comment.