Commit 136e93d4 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

fix extra code copied by mistake in tests_contribute.py

parent 252e7075
Pipeline #28935 passed with stages
in 14 minutes and 3 seconds
......@@ -124,20 +124,3 @@ class PDBFormTestCase(TestCase):
form.has_error("pdb_id", code="no_mapping"),
"PDB code with no Uniprot mapping (3wn8) should be rejected with no_mappping error code",
)
class PDBFormTestCase(TestCase):
"""
Test the PDB form data validation
"""
def test_valid(self):
form = PDBForm({"pdb_id": "3wn7"})
self.assertTrue(form.is_valid(), "valid PDB code should be accepted")
def test_invalid_PDB_format(self):
form = PDBForm({"pdb_id": "33wn7"})
self.assertFalse(form.is_valid(), "5 char long PDB code should be rejected")
self.assertTrue(
form.has_error("pdb_id", code="max_length"),
"5 char long PDB code should be rejected with max_length error code",
)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment