import requests

def register_asheesh():
    return requests.post(
        'http://localhost:3000/register',
        {'rawHostname': 'asheesh',
         'email': 'asheesh@asheesh.org',
         'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
        )

@@ -271,8 +271,282 @@
       )%0A
+%0Adef register_asheesh2_bad_key_type():%0A    return requests.post(%0A        'http://localhost:3000/register',%0A        %7B'rawHostname': 'asheesh2',%0A         'email': 'asheesh@asheesh.org',%0A         'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pem').read()%7D,%0A        )%0A

Add test validating key format validation