'Test the default command for each container workflow'

def test_command_good(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'}, sha=u'african-swallow', dockerfile=u'')
    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'web', num=1)
    self.assertEqual(c._command, u'start    web')
    c.type = u'worker'
    self.assertEqual(c._command, u'start    worker')
    build.sha = None
    c.type = u'web'
    self.assertEqual(c._command, u"bash    -c    'node    server.js'")
    build.sha = u'european-swallow'
    build.dockerfile = u'dockerdockerdocker'
    self.assertEqual(c._command, u"bash    -c    'node    server.js'")
    c.type = u'cmd'
    self.assertEqual(c._command, u'')
    build.procfile[u'cmd'] = u'node    server.js'
    self.assertEqual(c._command, u"bash    -c    'node    server.js'")
    c.type = u'worker'
    self.assertEqual(c._command, u"bash    -c    'node    worker.js'")
    c.release.build.procfile = None
    self.assertEqual(c._command, u'start    worker')
