Refactored to remove beautifulsoup4 dependency
parent
697399fee7
commit
b43901482a
1
Pipfile
1
Pipfile
|
@ -21,7 +21,6 @@ Flask = "==1.1.1"
|
|||
Jinja2 = "==2.10.1"
|
||||
MarkupSafe = "==1.1.1"
|
||||
Werkzeug = "==0.15.4"
|
||||
beautifulsoup4 = "*"
|
||||
pytest = "*"
|
||||
|
||||
[requires]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "fd2a8293d84ba8b44e1dcc458d96495ad5f336be7a2bad90a7fb919afc54e4b2"
|
||||
"sha256": "e975de6dd8a32ef70095ea7cb8d5a7db25f616e6ea0f1cb2c0ab9c78dc274674"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -23,15 +23,6 @@
|
|||
],
|
||||
"version": "==19.3.0"
|
||||
},
|
||||
"beautifulsoup4": {
|
||||
"hashes": [
|
||||
"sha256:594ca51a10d2b3443cbac41214e12dbb2a1cd57e1a7344659849e2e20ba6a8d8",
|
||||
"sha256:a4bbe77fd30670455c5296242967a123ec28c37e9702a8a81bd2f20a4baf0368",
|
||||
"sha256:d4e96ac9b0c3a6d3f0caae2e4124e6055c5dcafde8e2f831ff194c104f0775a0"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.9.0"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939",
|
||||
|
@ -193,13 +184,6 @@
|
|||
],
|
||||
"version": "==1.14.0"
|
||||
},
|
||||
"soupsieve": {
|
||||
"hashes": [
|
||||
"sha256:e914534802d7ffd233242b785229d5ba0766a7f487385e3f714446a07bf540ae",
|
||||
"sha256:fcd71e08c0aee99aca1b73f45478549ee7e7fc006d51b37bec9e9def7dc22b69"
|
||||
],
|
||||
"version": "==2.0"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1",
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import pytest
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
# Test that the application successfully serves the main page
|
||||
def test_search_page(client):
|
||||
res = client.get("/")
|
||||
assert res.status_code == 200
|
||||
page = BeautifulSoup(res.data, 'html.parser')
|
||||
assert page.title.string == "Copyright Renewals"
|
||||
assert b'<form>' in res.data
|
||||
|
||||
# Test that a successful title search yields results
|
||||
def test_successful_title_search(client):
|
||||
|
|
Loading…
Reference in New Issue