Skip to content

Commit a3a47ed

Browse files
committed
Add testing of opt-in opt-out.
Does this have any un-intended side effects?
1 parent cf29804 commit a3a47ed

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test:
2+
py.test --pyargs popylar --cov-report term-missing --cov=popylar

popylar/tests/test_popylar.py

+9
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ def test_track_event_with_version():
1818
'test_track_event_with_version',
1919
software_version=VERSION)
2020
assert r.status_code == 200, "response is not OK"
21+
22+
23+
def test_opt():
24+
popylar.opt_out()
25+
parser = popylar.get_or_create_config()
26+
assert parser['user']['track'] == "False"
27+
popylar.opt_in()
28+
parser = popylar.get_or_create_config()
29+
assert parser['user']['track'] == "True"

0 commit comments

Comments
 (0)