Skip to content

Commit 9f0ad15

Browse files
author
Gabriel Monroy
committed
remove deprecated key CM test
1 parent 4fbe908 commit 9f0ad15

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

api/tests/test_key.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
from __future__ import unicode_literals
88

99
import json
10-
import os.path
1110

1211
from django.test import TestCase
1312
from django.test.utils import override_settings
1413

1514
from api.models import Key
16-
from deis import settings
1715

1816

1917
PUBKEY = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfQkkUUoxpvcNMkvv7jqnfodgs37M2eBO" \
@@ -55,29 +53,6 @@ def test_key(self):
5553
response = self.client.delete(url)
5654
self.assertEqual(response.status_code, 204)
5755

58-
def test_key_cm(self):
59-
"""
60-
Test that creating and deleting a key updates configuration management
61-
"""
62-
url = '/api/keys'
63-
body = {'id': 'mykey@box.local', 'public': PUBKEY}
64-
response = self.client.post(url, json.dumps(body), content_type='application/json')
65-
self.assertEqual(response.status_code, 201)
66-
key_id = response.data['id']
67-
path = os.path.join(settings.TEMPDIR, 'user-autotest')
68-
with open(path) as f:
69-
data = json.loads(f.read())
70-
self.assertIn('id', data)
71-
self.assertEquals(data['id'], 'autotest')
72-
self.assertIn(body['id'], data['ssh_keys'])
73-
self.assertEqual(body['public'], data['ssh_keys'][body['id']])
74-
url = '/api/keys/{key_id}'.format(**locals())
75-
response = self.client.delete(url)
76-
self.assertEqual(response.status_code, 204)
77-
with open(path) as f:
78-
data = json.loads(f.read())
79-
self.assertNotIn(body['id'], data['ssh_keys'])
80-
8156
def test_key_duplicate(self):
8257
"""
8358
Test that a user cannot add a duplicate key

0 commit comments

Comments
 (0)