Skip to content

Commit

Permalink
fix(inventory): rename ad_block to adblock
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Dec 10, 2024
1 parent 8ecd11c commit f856288
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/nethsec/inventory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def fact_threat_shield(uci: EUci):
pass
return ret

def fact_ad_block(uci: EUci):
def fact_adblock(uci: EUci):
ret = { 'enabled': False, 'community': 0, 'enterprise': 0 }
ret['enabled'] = uci.get('adblock', 'global', 'ts_enabled', default='0') == '1'
try:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def test_fact_firewall_stats(tmp_path):
assert result['objects']['rules']['input'] == 1
assert result['objects']['rules']['output'] == 1

def test_fact_ad_block(tmp_path):
def test_fact_adblock(tmp_path):
u = _setup_db(tmp_path)
result = inventory.fact_ad_block(u)
result = inventory.fact_adblock(u)
assert result == {"enabled": True, "community": 5, "enterprise": 2}

0 comments on commit f856288

Please sign in to comment.