blob: d52bffc72c1c947a44b60e76cf924d5f6c5bb066 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# coding=utf-8
"""
Protein-Ligand Interaction Profiler - Analyze and visualize protein-ligand interactions in PDB files.
test_remote_services.py - Unit Tests for remote services.
"""
import unittest
from plip.exchange.webservices import check_pdb_status
class TestPDB(unittest.TestCase):
"""Test PDB Web Service methods"""
def test_pdb_entry_status(self):
# 1a0v is an obsolete entry and is replaced by 1y46
status, current_pdbid = check_pdb_status('1a0v')
self.assertEqual(status, 'OBSOLETE')
self.assertEqual(current_pdbid, '1y46')
# 1vsn is an current entry
status, current_pdbid = check_pdb_status('1vsn')
self.assertEqual(status, 'CURRENT')
self.assertEqual(current_pdbid, '1vsn')
# xxxx is not an PDB entry
status, current_pdbid = check_pdb_status('xxxx')
self.assertEqual(status, 'UNKNOWN')
self.assertEqual(current_pdbid, 'xxxx')
|