def test_self_check_db_positive_disable(test_db): logger = Mock() assert test_db.sites[0].disabled is False loop = asyncio.get_event_loop() loop.run_until_complete( self_check(test_db, test_db.sites_dict, logger, silent=True)) assert test_db.sites[0].disabled is True
def test_self_check_db_positive_disable(): logger = Mock() db = MaigretDatabase() db.load_from_json(EXAMPLE_DB) assert db.sites[0].disabled == False loop = asyncio.get_event_loop() loop.run_until_complete(self_check(db, db.sites_dict, logger, silent=True)) assert db.sites[0].disabled == True
def test_self_check_db_negative_enabled(test_db): logger = Mock() test_db.sites[0].disabled = False test_db.sites[0].username_claimed = 'Facebook' assert test_db.sites[0].disabled is False loop = asyncio.get_event_loop() loop.run_until_complete( self_check(test_db, test_db.sites_dict, logger, silent=True)) assert test_db.sites[0].disabled is False
def test_self_check_db_negative_enabled(): logger = Mock() db = MaigretDatabase() db.load_from_json(EXAMPLE_DB) db.sites[0].disabled = False db.sites[0].username_claimed = 'Facebook' assert db.sites[0].disabled == False loop = asyncio.get_event_loop() loop.run_until_complete(self_check(db, db.sites_dict, logger, silent=True)) assert db.sites[0].disabled == False