import mongomock
import requests
import rsvptest
import unittest


class RSVPAppTest(unittest.TestCase):
    def setUp(self):
        self.app = rsvptest.app.test_client()
        rsvptest.client = mongomock.MongoClient()
        rsvptest.db = rsvptest.client.mock_db_function

    def test_black_box_application_response(self):
        post_address = 'http://localhost:5000/new'
        user_data = {'name': 'test_name', 'email': 'test_email@test_domain.com'}
        r = requests.post(post_address, user_data)
        self.assertEqual(r.status_code, 200)

    def test_flask_app_response(self):
        user_data = {'name': 'test_name', 'email': 'test_email@test_domain.com'}
        status_code = self.app.post('/new', data=user_data, follow_redirects=True).status_code
        self.assertEqual(200, status_code)

@@ -1,37 +1,17 @@
-import mongomock%0Aimport requests%0A
+from rsvpapp 
 impo
@@ -33,764 +33,117 @@
 ort 
-unit
+py
 test%0A
-%0A%0Aclass RSVPAppTest(unittest.TestCase):%0A    def setUp(
+@pytest.fixture%0Adef 
 self
+(
 ):%0A    
-    self.app = rsvptest.app.test_client()%0A        rsvptest.client = mongomock.MongoClient()%0A        rsvptest.db = rsvptest.client.mock_db_function%0A%0A    def test_black_box_application_response(self):%0A        post_address = 'http://localhost:5000/new'%0A        user_data = %7B'name': 'test_name', 'email': 'test_email@test_domain.com'%7D%0A        r = requests.post(post_address, user_data)%0A        self.assertEqual(r.status_code, 200)%0A%0A    def test_flask_app_response(self):%0A        user_data = %7B'name': 'test_name', 'email': 'test_email@test_domain.com'%7D%0A        status_code = self.app.post('/new', data=user_data, follow_redirects=True).status_code%0A        self.assertEqual(200, status_code)
+return rsvptest.app.test_client()%0A    %0A%0Adef test_urls(self):%0A    return %0A
 %0A

Update test_rsvpapp.py