Skip to content

Commit

Permalink
feat(cli): define the agency top-level command
Browse files Browse the repository at this point in the history
    benefits agency -h
  • Loading branch information
thekaveman committed Oct 31, 2024
1 parent 0885a71 commit 78127a4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions benefits/cli/management/commands/agency.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from benefits.cli.commands import BenefitsCommand


class Command(BenefitsCommand):
"""Work with transit agencies."""

help = __doc__
name = "agency"
subcommands = []

def __init__(self, stdout=None, stderr=None, no_color=False, force_color=False):
super().__init__(stdout, stderr, no_color, force_color)
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions tests/pytest/cli/management/commands/test_agency.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest

from benefits.cli.management.commands.agency import Command


@pytest.mark.django_db
def test_class():
assert Command.help == Command.__doc__
assert Command.name == "agency"
assert Command.subcommands == []


@pytest.mark.django_db
def test_init():
cmd = Command()

assert "agency" in cmd.subparsers
assert cmd.subparser == cmd.subparsers["agency"]

0 comments on commit 78127a4

Please sign in to comment.