Exemple #1
0
 def test_gitserver_stop_off(self):
     self.input.admin = True
     self.input.group = lambda x: [None, 'stop'][x]
     git.teardown(self.phenny)
     git.gitserver(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.assertTrue("Server is already down" in out and not git.httpd) 
Exemple #2
0
 def test_gitserver_stop_off(self):
     self.input.admin = True
     self.input.group = lambda x: [None, 'stop'][x]
     git.teardown(self.phenny)
     git.gitserver(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.assertTrue("Server is already down" in out and not git.httpd) 
Exemple #3
0
 def test_gitserver_status_down_admin(self):
     git.teardown(self.phenny)
     self.input.admin = True
     self.input.group = lambda x: [None, 'status'][x]
     git.gitserver(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.assertTrue("Server is down" in out) 
Exemple #4
0
 def test_gitserver_status_down_admin(self):
     git.teardown(self.phenny)
     self.input.admin = True
     self.input.group = lambda x: [None, 'status'][x]
     git.gitserver(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.assertTrue("Server is down" in out) 
Exemple #5
0
 def test_auto_start(self):
     self.input.nick = "begiak"
     self.phenny.nick = "begiak"
     self.phenny.config.githook_autostart = True
     git.auto_start(self.phenny, self.input)
     thread_status = git.httpd
     git.teardown(self.phenny)
     self.assertTrue(thread_status)
Exemple #6
0
 def test_auto_start(self):
     self.input.nick = "begiak2"
     self.phenny.nick = "begiak2"
     self.phenny.phenny.config.githook_autostart = True
     git.auto_start(self.phenny, self.input)
     thread_status = git.httpd or Thread(target=git.httpd.serve_forever).isAlive()
     git.teardown(self.phenny)
     self.assertTrue(thread_status)
Exemple #7
0
 def test_auto_start(self):
     self.input.nick = "begiak"
     self.phenny.nick = "begiak"
     self.phenny.config.githook_autostart = True
     git.auto_start(self.phenny, self.input)
     thread_status = git.httpd
     git.teardown(self.phenny)
     self.assertTrue(thread_status)
Exemple #8
0
 def test_gitserver_start_off(self):
     self.input.admin = True
     self.input.group = lambda x: [None, 'start'][x]
     git.teardown(self.phenny)
     git.gitserver(self.phenny, self.input)
     self.assertTrue(git.httpd)
Exemple #9
0
 def test_setup_server(self):
     git.setup_server(self.phenny)
     thread_status = git.httpd
     git.teardown(self.phenny)
     self.assertTrue(thread_status)
Exemple #10
0
 def test_gitserver_start_off(self):
     self.input.admin = True
     self.input.group = lambda x: [None, 'start'][x]
     git.teardown(self.phenny)
     git.gitserver(self.phenny, self.input)
     self.assertTrue(git.httpd)
Exemple #11
0
 def test_setup_server(self):
     git.setup_server(self.phenny)
     thread_status = git.httpd
     git.teardown(self.phenny)
     self.assertTrue(thread_status)