-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy pathnewman.test.js
42 lines (36 loc) · 1.46 KB
/
newman.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var runNewmanTest = require('../../../../test/codegen/newman/newmanTestUtil').runNewmanTest,
convert = require('../../lib/index').convert;
describe('Convert for different types of request', function () {
describe('Run tests for Python 2', function () {
var options = {
indentType: 'Space',
indentCount: 4
},
testConfig = {
fileName: 'codesnippet.py',
runScript: 'PYTHONIOENCODING=utf-8 python codesnippet.py',
compileScript: null,
// Requests does not support multipart/form-data unless we are also
// uploading a file. Headers are stored in a dict so we cannot have
// two headers with same key
skipCollections: ['formdataCollection', 'sameNameHeadersCollection', 'unsupportedMethods']
};
runNewmanTest(convert, options, testConfig);
});
describe('Run tests for Python 3', function () {
var options = {
indentType: 'Space',
indentCount: 4
},
testConfig = {
fileName: 'codesnippet.py',
runScript: 'PYTHONIOENCODING=utf-8 python3 codesnippet.py',
compileScript: null,
// Requests does not support multipart/form-data unless we are also
// uploading a file. Headers are stored in a dict so we cannot have
// two headers with same key
skipCollections: ['formdataCollection', 'sameNameHeadersCollection', 'unsupportedMethods']
};
runNewmanTest(convert, options, testConfig);
});
});