Skip to content

Instantly share code, notes, and snippets.

@dlitvakb
Created August 9, 2012 21:02
Show Gist options
  • Select an option

  • Save dlitvakb/3308024 to your computer and use it in GitHub Desktop.

Select an option

Save dlitvakb/3308024 to your computer and use it in GitHub Desktop.
from unittest import TestCase, main
from netdnarws import NetDNA
class SomeDescritptiveTestName(TestCase):
def setUp(self):
self.api = NetDNA("alias",
"xxx",
"xxx",
"lrws.netdna.com",
False)
def test_calling_an_api_with_improper_values_gives_a_400(self):
response = self.api.put("/zones/pull.json/6066", data={'compress':'x'}, debug_request=True)
self.assertEquals(400, response.json['code'])
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment