def setUp(self): FTPython.connect("babbage.cs.pdx.edu", 8000, "test_user", "test") self.assertTrue(FTPython.ftp_connection is not None)
def test_connect_bad_input(self): sys.stdin = open("test_connection_bad_input.txt", 'r') FTPython.parse_input() self.assertRaises(ValueError)
def test_bad_username(self): FTPython.connect("babbage.cs.pdx.edu", 8000, "bad", "test") self.assertTrue(FTPython.ftp_connection is None)
def test_bad_server(self): FTPython.connect("bad", 8000, "test_user", "test") self.assertTrue(FTPython.ftp_connection is None)
def test_bad_username(self): FTPython.connect("babbage.cs.pdx.edu", 8000, "bad", "test") self.assertRaises(ft.all_errors)
def test_bad_server(self): FTPython.connect("bad", 8000, "test_user", "test") self.assertRaises(ft.all_errors)