Skip to content

Commit 273fed7

Browse files
committed
add cassette for workflow test
1 parent c04cd9b commit 273fed7

File tree

2 files changed

+144
-0
lines changed

2 files changed

+144
-0
lines changed
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Connection:
10+
- keep-alive
11+
User-Agent:
12+
- python-requests/2.25.1
13+
authorization:
14+
- DUMMY
15+
method: GET
16+
uri: https://authorityspoke.com/api/v1/us/usc/t18/s1960/a/
17+
response:
18+
body:
19+
string: '{"heading":"","start_date":"2013-07-18","node":"/us/usc/t18/s1960/a","text_version":{"id":943736,"url":"https://authorityspoke.com/api/v1/textversions/943736/","content":"Whoever
20+
knowingly conducts, controls, manages, supervises, directs, or owns all or
21+
part of an unlicensed money transmitting business, shall be fined in accordance
22+
with this title or imprisoned not more than 5 years, or both."},"url":"https://authorityspoke.com/api/v1/us/usc/t18/s1960/a/","end_date":null,"children":[],"citations":[],"parent":"https://authorityspoke.com/api/v1/us/usc/t18/s1960/"}'
23+
headers:
24+
Allow:
25+
- GET, POST, PUT, PATCH, HEAD, OPTIONS
26+
Connection:
27+
- keep-alive
28+
Content-Length:
29+
- '568'
30+
Content-Type:
31+
- application/json
32+
Date:
33+
- Fri, 09 Apr 2021 20:23:04 GMT
34+
Referrer-Policy:
35+
- same-origin
36+
Server:
37+
- gunicorn/20.0.4
38+
Vary:
39+
- Accept, Cookie
40+
Via:
41+
- 1.1 vegur
42+
X-Content-Type-Options:
43+
- nosniff
44+
X-Frame-Options:
45+
- DENY
46+
status:
47+
code: 200
48+
message: OK
49+
- request:
50+
body: null
51+
headers:
52+
Accept:
53+
- '*/*'
54+
Accept-Encoding:
55+
- gzip, deflate
56+
Connection:
57+
- keep-alive
58+
User-Agent:
59+
- python-requests/2.25.1
60+
authorization:
61+
- DUMMY
62+
method: GET
63+
uri: https://authorityspoke.com/api/v1/coverage/us/usc/
64+
response:
65+
body:
66+
string: '{"uri":"/us/usc","latest_heading":"United States Code (USC)","first_published":"1926-06-30","earliest_in_db":"2013-07-18","latest_in_db":"2021-01-05"}'
67+
headers:
68+
Allow:
69+
- GET, HEAD, OPTIONS
70+
Connection:
71+
- keep-alive
72+
Content-Length:
73+
- '150'
74+
Content-Type:
75+
- application/json
76+
Date:
77+
- Fri, 09 Apr 2021 20:23:05 GMT
78+
Referrer-Policy:
79+
- same-origin
80+
Server:
81+
- gunicorn/20.0.4
82+
Vary:
83+
- Accept, Cookie
84+
Via:
85+
- 1.1 vegur
86+
X-Content-Type-Options:
87+
- nosniff
88+
X-Frame-Options:
89+
- DENY
90+
status:
91+
code: 200
92+
message: OK
93+
- request:
94+
body: null
95+
headers:
96+
Accept:
97+
- '*/*'
98+
Accept-Encoding:
99+
- gzip, deflate
100+
Connection:
101+
- keep-alive
102+
User-Agent:
103+
- python-requests/2.25.1
104+
authorization:
105+
- DUMMY
106+
method: GET
107+
uri: https://authorityspoke.com/api/v1/us/usc/t18/s1960/b/2/
108+
response:
109+
body:
110+
string: "{\"heading\":\"\",\"start_date\":\"2013-07-18\",\"node\":\"/us/usc/t18/s1960/b/2\",\"text_version\":{\"id\":943741,\"url\":\"https://authorityspoke.com/api/v1/textversions/943741/\",\"content\":\"the
111+
term \u201Cmoney transmitting\u201D includes transferring funds on behalf
112+
of the public by any and all means including but not limited to transfers
113+
within this country or to locations abroad by wire, check, draft, facsimile,
114+
or courier; and\"},\"url\":\"https://authorityspoke.com/api/v1/us/usc/t18/s1960/b/2/\",\"end_date\":null,\"children\":[],\"citations\":[],\"parent\":\"https://authorityspoke.com/api/v1/us/usc/t18/s1960/b/\"}"
115+
headers:
116+
Allow:
117+
- GET, POST, PUT, PATCH, HEAD, OPTIONS
118+
Connection:
119+
- keep-alive
120+
Content-Length:
121+
- '588'
122+
Content-Type:
123+
- application/json
124+
Date:
125+
- Fri, 09 Apr 2021 20:23:05 GMT
126+
Referrer-Policy:
127+
- same-origin
128+
Server:
129+
- gunicorn/20.0.4
130+
Vary:
131+
- Accept, Cookie
132+
Via:
133+
- 1.1 vegur
134+
X-Content-Type-Options:
135+
- nosniff
136+
X-Frame-Options:
137+
- DENY
138+
status:
139+
code: 200
140+
message: OK
141+
version: 1

tests/test_workflow.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
from dotenv import load_dotenv
33

4+
import pytest
5+
46
from legislice.download import Client
57
from authorityspoke import Entity, Fact, Predicate, Holding
68

@@ -18,6 +20,7 @@ class TestAddHoldings:
1820
No. 2019-0395 (D.D.C. 2020) (December 24th, 2020)
1921
"""
2022

23+
@pytest.mark.vcr
2124
def test_create_and_add_holdings(self):
2225
offense_statute = CLIENT.read("/us/usc/t18/s1960/a")
2326
no_license = Fact(

0 commit comments

Comments
 (0)