aboutsummaryrefslogtreecommitdiff
path: root/plip/test/test_remote_services.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-07-02 20:48:33 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-07-02 20:48:33 +0530
commit4be08f7bdd77991e9e453c1cda863c3f20c338d5 (patch)
tree083e8e91622221185a28fd50754abc2f86b1df43 /plip/test/test_remote_services.py
initial commit
Diffstat (limited to 'plip/test/test_remote_services.py')
-rw-r--r--plip/test/test_remote_services.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/plip/test/test_remote_services.py b/plip/test/test_remote_services.py
new file mode 100644
index 0000000..d52bffc
--- /dev/null
+++ b/plip/test/test_remote_services.py
@@ -0,0 +1,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')