'Verify that the pause method actually works. In this case, working
means that the process doesn\'t send any more HTTP requests after we,
pause and that stop works when paused.
This test seems to be failing @ CircleCI because of a test dependency
issue. If run alone in your workstation it will PASS, but if run at
CircleCI the count plugin doesn\'t seem to start.'

@attr('ci_fails')
def test_pause_stop(self):

    core_start = Process(target=self.w3afcore.start, name='TestRunner')
    core_start.daemon = True
    core_start.start()
    time.sleep(5)
    count_before_pause = self.count_plugin.count
    self.assertGreater(self.count_plugin.count, 0)
    self.w3afcore.pause(True)
    count_after_pause = self.count_plugin.count
    time.sleep(2)
    count_after_sleep = self.count_plugin.count
    all_equal = (count_before_pause == count_after_pause == count_after_sleep)
    self.assertTrue(all_equal)
    self.w3afcore.stop()
    core_start.join()
    self.assertEqual(self.count_plugin.count, count_after_sleep)
