Ejemplo n.º 1
0
 def test_hook_once(self):
     # Calling the hook once records the passed branch identifier in the
     # process title.
     initial_title = self.factory.getUniqueString()
     setproctitle_mod = FakeSetProcTitleModule(initial_title)
     branch_url = self.factory.getUniqueString()
     hook = SetProcTitleHook(setproctitle_mod)
     hook.seen(branch_url)
     self.assertEqual(initial_title + " BRANCH:" + branch_url,
                      setproctitle_mod.getproctitle())
Ejemplo n.º 2
0
 def test_hook_once(self):
     # Calling the hook once records the passed branch identifier in the
     # process title.
     initial_title = self.factory.getUniqueString()
     setproctitle_mod = FakeSetProcTitleModule(initial_title)
     branch_url = self.factory.getUniqueString()
     hook = SetProcTitleHook(setproctitle_mod)
     hook.seen(branch_url)
     self.assertEqual(
         initial_title + " BRANCH:" + branch_url,
         setproctitle_mod.getproctitle())
Ejemplo n.º 3
0
 def test_hook_twice(self):
     # Calling the hook twice replaces the first branch identifier in the
     # process title.
     initial_title = self.factory.getUniqueString()
     setproctitle_mod = FakeSetProcTitleModule(initial_title)
     branch_url1 = self.factory.getUniqueString()
     branch_url2 = self.factory.getUniqueString()
     hook = SetProcTitleHook(setproctitle_mod)
     hook.seen(branch_url1)
     hook.seen(branch_url2)
     self.assertEqual(initial_title + " BRANCH:" + branch_url2,
                      setproctitle_mod.getproctitle())
Ejemplo n.º 4
0
 def test_hook_twice(self):
     # Calling the hook twice replaces the first branch identifier in the
     # process title.
     initial_title = self.factory.getUniqueString()
     setproctitle_mod = FakeSetProcTitleModule(initial_title)
     branch_url1 = self.factory.getUniqueString()
     branch_url2 = self.factory.getUniqueString()
     hook = SetProcTitleHook(setproctitle_mod)
     hook.seen(branch_url1)
     hook.seen(branch_url2)
     self.assertEqual(
         initial_title + " BRANCH:" + branch_url2,
         setproctitle_mod.getproctitle())