'Verify that the pause method actually works. In this case, working
means that the process doesn\'t send any more HTTP requests, fact
that is verified with the "fake" count plugin.'

@attr('ci_fails')
def test_pause_unpause(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.pause(False)
    core_start.join()
    self.assertEqual(self.count_plugin.count, self.count_plugin.loops)
