Skip to content

Instantly share code, notes, and snippets.

@Bernardoow
Created May 25, 2018 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bernardoow/c54e6bcb448b2d1d56a469b249b21a69 to your computer and use it in GitHub Desktop.
Save Bernardoow/c54e6bcb448b2d1d56a469b249b21a69 to your computer and use it in GitHub Desktop.
import betamax
from betamax.fixtures import unittest
import requests
def function():
response = requests.get('https://httpbin.org/get')
return response.json().get('url')
class IntegrationTestCase(unittest.BetamaxTestCase):
CASSETTE_LIBRARY_DIR = "./bernardo"
class SpecificTestCase(IntegrationTestCase):
def test_something(self):
self.assertEqual(function(), 'https://httpbin.org/get')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment