'Test that app info doesn\'t show transient "run" proctypes.'

def test_scaling_does_not_add_run_proctypes_to_structure(self):

    url = u'/v1/apps'
    response = self.client.post(url, HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    self.assertEqual(response.status_code, 201)
    app_id = response.data[u'id']
    app = App.objects.get(id=app_id)
    user = User.objects.get(username=u'autotest')
    build = Build.objects.create(owner=user, app=app, image=u'qwerty', procfile={u'web': u'node    server.js', u'worker': u'node    worker.js'}, dockerfile=u'foo', sha=u'somereallylongsha')
    release = Release.objects.create(version=2, owner=user, app=app, config=app.config_set.latest(), build=build)
    c = Container.objects.create(owner=user, app=app, release=release, type=u'run', num=1)
    url = u'/v1/apps/{app_id}/scale'.format(**locals())
    body = {u'web': 3}
    response = self.client.post(url, json.dumps(body), content_type=u'application/json', HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    self.assertEqual(response.status_code, 204)
    url = u'/v1/apps/{app_id}'.format(**locals())
    response = self.client.get(url, HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    self.assertEqual(response.status_code, 200)
    self.assertNotIn(u'run', response.data[u'structure'])
