Skip to content

Commit

Permalink
Updating example secret key (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomatoss authored Feb 25, 2022
1 parent bc205b4 commit 777f8b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Confira nossa documentação no portal [developers.grupozap.com](https://develop

## Exemplos

[python](/samples/python/README.md)
[nodejs](/samples/nodejs/README.md)
[java](/samples/java/README.md)
[go](/samples/go/README.md)
- [python](/samples/python/README.md)
- [nodejs](/samples/nodejs/README.md)
- [java](/samples/java/README.md)
- [go](/samples/go/README.md)
6 changes: 3 additions & 3 deletions samples/nodejs/tests/unit/routes/lead.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const leadRouter = require('../../../src/routes/lead')
const request = require('supertest');
const express = require('express');

const { lead } = require('../../fixtures/fixtures')
const { lead } = require('../../fixtures/fixtures');

const authorizationHash = '***REMOVED***';
const authorizationHash = 'dml2YXJlYWw6WFhYWFhYWFhYWFhYWFhYWFg=';

const app = express();
app.use(leadRouter);
Expand All @@ -14,7 +14,7 @@ const env = Object.assign({}, process.env);

after(() => {
process.env = env;
process.env.SECRET_KEY = '***REMOVED***';
process.env.SECRET_KEY = 'XXXXXXXXXXXXXXXXX';
});

describe('POST /lead', () => {
Expand Down
4 changes: 2 additions & 2 deletions samples/python/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def test_when_I_call_lead_using_a_wrong_credential_should_be_error(self):
self.assertEqual(response.status_code, 401)

def test_when_I_call_lead_using_a_right_credential_should_be_success(self):
self.monkeypatch.setenv("SECRET_KEY", "***REMOVED***")
response = self.client_api.post("/lead", json=self.lead_request_model.dict(), headers={"Authorization": "***REMOVED***"})
self.monkeypatch.setenv("SECRET_KEY", "XXXXXXXXXXXXXXXXX")
response = self.client_api.post("/lead", json=self.lead_request_model.dict(), headers={"Authorization": "dml2YXJlYWw6WFhYWFhYWFhYWFhYWFhYWFg="})
self.assertEqual(response.status_code, 200)

0 comments on commit 777f8b4

Please sign in to comment.