Call-for-Code-for-Racial-Justice / Legit-Info

"Legit Info" app helps residents understand the impact of legislation and policies based on their country, state, county, city, district location
Apache License 2.0
67 stars 74 forks source link

Add locations endpoint test #151

Closed nikevsoft closed 2 years ago

nikevsoft commented 2 years ago

Signed-off-by: Kevin Ruiz jkevincodes@gmail.com

Contributes to #142

What did you do?

Add test for locations endpoint

Why did you do it?

Missing test

How have you tested it?

Local test run. In order to run endpoint test currently, we would need to change the following setting in the settings.py STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'

Then run the test with ./manage.py test

**Using SQLite3**
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
02-01 02:55:02 add_states:handle [INFO] l31: OH:Ohio found, skipping.
.02-01 02:55:02 add_states:handle [INFO] l31: GA:Georgia missing. Adding now.
02-01 02:55:02 add_states:handle [INFO] l31: MN:Minnesota missing. Adding now.
02-01 02:55:02 add_states:handle [INFO] l31: TX:Texas missing. Adding now.
.02-01 02:55:02 add_states:handle [INFO] l31: CA:California missing. Adding now.
......02-01 02:55:03 views:health [INFO] 177:Health AnonymousUser
.02-01 02:55:03 views:health [INFO] 177:Health AnonymousUser
....
----------------------------------------------------------------------
Ran 13 tests in 2.915s

OK
Destroying test database for alias 'default'...

Were docs updated if needed?

Type of change

Checklist:

nikevsoft commented 2 years ago

I'm sure there are a couple more test i'm missing, would appreciate some other suggestions on what to test

nikevsoft commented 2 years ago

@upkarlidder @tonypearson