Skip to content

Commit

Permalink
test making Enactment from selector without exact text
Browse files Browse the repository at this point in the history
  • Loading branch information
mscarey committed Jun 28, 2019
1 parent d0c087c commit b65ce21
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_enactments.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ def test_make_enactment(self, make_enactment):
search_clause = make_enactment["search_clause"]
assert search_clause.text.endswith("shall not be violated")

def test_make_enactment_from_selector_without_code(self, make_code):
select = TextQuoteSelector(
path="/us/const/article-III/1", suffix=", shall be vested"
)
art_3 = Enactment(selector=select, code=make_code["const"])
assert art_3.text.startswith("The judicial Power")
assert art_3.text.endswith("the United States")

def test_make_enactment_from_dict_with_code(self, make_code):
fourth_a = Enactment.from_dict(
factor_record={"path": "/us/const/amendment-IV"}, code=make_code["const"]
Expand Down

0 comments on commit b65ce21

Please sign in to comment.