-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest_builds.py
More file actions
48 lines (37 loc) · 1.38 KB
/
test_builds.py
File metadata and controls
48 lines (37 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
Unit tests for the Deis CLI build commands.
Run these tests with "python -m unittest client.tests.test_builds"
or with "./manage.py test client.BuildsTest".
"""
from __future__ import unicode_literals
from unittest import TestCase
class BuildsTest(TestCase):
pass
# class TestBuild(unittest.TestCase):
# """Test builds."""
# def setUp(self):
# # TODO: set up the c3/api/fixtures/tests.json...somehow
# child = pexpect.spawn('{} login {}'.format(CLI, CONTROLLER))
# child.expect('username:')
# child.sendline('autotest')
# child.expect('password:')
# child.sendline('password')
# child.expect('Logged in as autotest')
# def tearDown(self):
# self.child = None
# def test_build(self):
# """Test that a user can publish a new build."""
# _, temp = tempfile.mkstemp()
# body = {
# 'sha': uuid.uuid4().hex,
# 'slug_size': 4096000,
# 'procfile': json.dumps({'web': 'node server.js'}),
# 'url':
# 'http://deis.local/slugs/1c52739bbf3a44d3bfb9a58f7bbdd5fb.tar.gz',
# 'checksum': uuid.uuid4().hex,
# }
# with open(temp, 'w') as f:
# f.write(json.dumps(body))
# child = pexpect.spawn(
# 'cat {} | {} builds:create - --app=test-app'.format(temp, CLI))
# child.expect('Usage: ')