Skip to content

Commit

Permalink
Fix minor formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
crcollins committed Aug 24, 2017
1 parent b09866d commit 0c40ff2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions chem/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from project.utils import StringIO, SSHClient, SFTPClient
from data.models import DataPoint
from account.models import CustomUser
from cluster.models import Cluster, Credential
from chemtools.constants import KEYWORDS
import views
Expand All @@ -22,7 +21,8 @@
from models import ErrorReport


NAMES = ["24a_TON", "24b_TSP_24a_24a", "CON_24a", "A_TON_A_A", "TON_CCC", "EON"]
NAMES = ["24a_TON", "24b_TSP_24a_24a",
"CON_24a", "A_TON_A_A", "TON_CCC", "EON"]
BAD_NAMES = [
("2a_TON_CC", "no rgroups allowed on aryl0"),
("ASADA", "Bad Substituent Name(s): [u'S']"),
Expand Down Expand Up @@ -827,7 +827,6 @@ def test_post_single(self):
self.assertEqual(response.status_code, 200)
url = reverse(views.molecule_detail, args=(name, ))
response = self.client.post(url, options)

results = json.loads(response.content)
self.assertIsNone(results["error"])
self.assertTrue(len(results["worked"]))
Expand Down Expand Up @@ -1066,7 +1065,6 @@ def setUp(self):
super_user = get_user_model().objects.create_superuser(**SUPER_USER)
super_user.save()


self.cluster = Cluster(**CLUSTER)
self.cluster.save()
self.credential = Credential(
Expand Down
4 changes: 2 additions & 2 deletions chem/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_multi_molecule_status(string, autoflip=False):
exact_spacer = name
if exact_spacer not in unique_molecules:
unique_molecules[exact_spacer] = [mol.name, error_report,
name_error, new]
name_error, new]

return zip(*unique_molecules.values())

Expand All @@ -75,7 +75,7 @@ def run_standard_jobs(credential, string, mol_settings, job_settings):
if not credential.user.is_staff:
results["error"] = "You must be a staff user to submit a job."
return results
except:
except Exception as e:
results["error"] = "Invalid credential"
results["cluster"] = None
return results
Expand Down
3 changes: 2 additions & 1 deletion project/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def get_sftp_connection(hostname, username, key=None, password=None, port=22):
return SFTPClient.from_transport(transport)


def get_ssh_connection(hostname, username, key=None, password=None, port=22, timeout=None):
def get_ssh_connection(hostname, username, key=None, password=None,
port=22, timeout=None):
if key is None and password is None:
raise Exception("no key or password")
client = SSHClient()
Expand Down

0 comments on commit 0c40ff2

Please sign in to comment.