Exemplo n.º 1
0
def test_project_update(controller):
    project = Project()
    project.setVariables([{'name': 'TEST'}])
    project.setSupplier({'logo': 'test.png', 'url':  'http://domain'})
    project.update()
    mock = controller._http_client.createHTTPQuery
    args, kwargs = mock.call_args
    body = kwargs['body']
    assert body['variables'] == [{'name': 'TEST'}]
    assert body['supplier'] == {'logo': 'test.png', 'url':  'http://domain'}
Exemplo n.º 2
0
def test_project_update(controller):
    project = Project()
    project.setVariables([{'name': 'TEST'}])
    project.setSupplier({'logo': 'test.png', 'url': 'http://domain'})
    project.update()
    mock = controller._http_client.createHTTPQuery
    args, kwargs = mock.call_args
    body = kwargs['body']
    assert body['variables'] == [{'name': 'TEST'}]
    assert body['supplier'] == {'logo': 'test.png', 'url': 'http://domain'}
Exemplo n.º 3
0
def test_project_variables():
    project = Project()
    project.setVariables([{'name': 'TEST'}])

    variables = project.variables()
    assert variables == [{'name': 'TEST'}]
Exemplo n.º 4
0
def test_project_variables():
    project = Project()
    project.setVariables([{'name': 'TEST'}])

    variables = project.variables()
    assert variables == [{'name': 'TEST'}]