How to use the asynctest.ignore_loop function in asynctest

To help you get started, we’ve selected a few asynctest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marvinpinto / charlesbot / tests / plugins / help_plugin / test_help_plugin.py View on Github external
    @asynctest.ignore_loop
    def test_help_msg_falsy(self):
        list_entry = "!help - This help message"
        self.hp.add_help_message("")
        self.assertEqual(len(self.hp.help_msg_list), 1)
        self.assertTrue(list_entry in self.hp.help_msg_list)
        self.hp.add_help_message([])
        self.assertEqual(len(self.hp.help_msg_list), 1)
        self.assertTrue(list_entry in self.hp.help_msg_list)
        self.hp.add_help_message(0)
        self.assertEqual(len(self.hp.help_msg_list), 1)
        self.assertTrue(list_entry in self.hp.help_msg_list)
github marvinpinto / charlesbot / tests / test_robot_help_messages.py View on Github external
    @asynctest.ignore_loop
    def test_empty_plugin_list(self):
        self.robot.plugin_list = []
        self.robot.initialize_static_plugins()
        self.assertEqual(len(self.robot.plugin_list), 2)
github fanmatics / metadoc / tests / test_module.py View on Github external
  @asynctest.ignore_loop
  def test_social(self):
    self.metadoc.query("social")
    assert self.metadoc.activity
github fanmatics / metadoc / tests / test_module.py View on Github external
  @asynctest.ignore_loop
  def test_query_all(self):
    result = self.metadoc.query()
    assert result
github fanmatics / metadoc / tests / test_pos.py View on Github external
  @asynctest.ignore_loop
  def test_string_ends_with_nnp(self):
    self.perceptron_tagger = AveragedPerceptronTagger(autoload=True)
    test_sentence = "The extraordinary phenomenon of fake news spread by Facebook and other \
      social media during the 2016 presidential election has been largely portrayed as a lucky break for Donald Trump"

    tags = self.perceptron_tagger.tag(test_sentence)
    entities = self.perceptron_tagger.named_entities(tags)
    
    assert tags[len(tags)-1][1] == "NNP"
    assert "Donald Trump" in entities
github fanmatics / metadoc / tests / test_module.py View on Github external
  @asynctest.ignore_loop
  def test_no_html(self):
    metadoc = Metadoc(url=self.url)
    metadoc.query()
github marvinpinto / charlesbot / tests / slack / test_slack_user.py View on Github external
    @asynctest.ignore_loop
    def test_user_return_string(self):
        self.su.id = "SU01"
        self.su.name = "User One"
        self.su.deleted = False
        self.su.is_admin = False
        self.su.has_2fa = True
        user_json = json.loads(str(self.su))
        self.assertEqual(user_json.get('id'), "SU01")
        self.assertEqual(user_json.get('name'), "User One")
        self.assertEqual(user_json.get('deleted'), False)
        self.assertEqual(user_json.get('is_admin'), False)
        self.assertEqual(user_json.get('has_2fa'), True)
        self.assertEqual(user_json.get('is_owner'), "")
github syncrypt / client / tests / common.py View on Github external
    @asynctest.ignore_loop
    def test_vault(self):
        self.assertEqual(len(list(self.vault.walk_disk())), 8)
github fanmatics / metadoc / tests / test_module.py View on Github external
  @asynctest.ignore_loop
  def test_domain(self):
    self.metadoc.query("domain")
    assert self.metadoc.domain
github marvinpinto / charlesbot / tests / plugins / pagerduty / test_get_pagerduty_schedules.py View on Github external
    @asynctest.ignore_loop
    def test_schedule_equality(self):
        sched_1 = PagerdutySchedule(
            description="sched_1",
            name="Schedule 1",
        )
        sched_2 = PagerdutySchedule(
            description="sched_2",
            name="Schedule 2",
        )
        self.assertNotEqual(sched_1, sched_2)
        sched_dict = {
            "description": "sched_1",
        }
        sched_2.load(sched_dict)
        self.assertNotEqual(sched_1, sched_2)
        sched_dict = {