Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parâmetro json #1

Open
rafaelcanovas opened this issue Sep 26, 2020 · 1 comment
Open

Parâmetro json #1

rafaelcanovas opened this issue Sep 26, 2020 · 1 comment

Comments

@rafaelcanovas
Copy link

rafaelcanovas commented Sep 26, 2020

Se não me engano existe um parâmetro json que possibilita enviar um dict diretamente sem ter que usar o json.dumps

data=json.dumps({'name': 'Comercial'})

@rafaelcanovas rafaelcanovas changed the title Se não me engano existe um parâmetro json que possibilita enviar um dict diretamente sem ter que usar o json.dumps Parâmetro json Sep 26, 2020
@daltroedu
Copy link
Owner

Pesquisei aqui e realmente existe, ficaria:

    def test_get_all_departaments(self):
        self.client.post(
            '/v1/departaments',
            headers=self.headers(),
            json={'name': 'Comercial'}
        )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants