Skip to content

Commit 9ebf68f

Browse files
authored
Merge pull request #64 from maxmind/greg/test-data
Ensure we don't use real values in examples and tests
2 parents 92508ba + c1e1e03 commit 9ebf68f

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

README.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,22 @@ The Factors service is called with the ``factors()`` method:
5151

5252
.. code-block:: pycon
5353
54-
>>> client.factors({'device': {'ip_address': '81.2.69.160'}})
55-
>>> await async_client.factors({'device': {'ip_address': '81.2.69.160'}})
54+
>>> client.factors({'device': {'ip_address': '152.216.7.110'}})
55+
>>> await async_client.factors({'device': {'ip_address': '152.216.7.110'}})
5656
5757
The Insights service is called with the ``insights()`` method:
5858

5959
.. code-block:: pycon
6060
61-
>>> client.insights({'device': {'ip_address': '81.2.69.160'}})
62-
>>> await async_client.insights({'device': {'ip_address': '81.2.69.160'}})
61+
>>> client.insights({'device': {'ip_address': '152.216.7.110'}})
62+
>>> await async_client.insights({'device': {'ip_address': '152.216.7.110'}})
6363
6464
The Score web service is called with the ``score()`` method:
6565

6666
.. code-block:: pycon
6767
68-
>>> client.score({'device': {'ip_address': '81.2.69.160'}})
69-
>>> await async_client.score({'device': {'ip_address': '81.2.69.160'}})
68+
>>> client.score({'device': {'ip_address': '152.216.7.110'}})
69+
>>> await async_client.score({'device': {'ip_address': '152.216.7.110'}})
7070
7171
Each of these methods takes a dictionary representing the transaction to be sent
7272
to the web service. The structure of this dictionary should be in `the format
@@ -84,8 +84,8 @@ Report Transaction web service is called with the ``report()`` method:
8484

8585
.. code-block:: pycon
8686
87-
>>> client.report({'ip_address': '81.2.69.160', 'tag': 'chargeback'})
88-
>>> await async_client.report({'ip_address': '81.2.69.160', 'tag': 'chargeback'})
87+
>>> client.report({'ip_address': '152.216.7.110', 'tag': 'chargeback'})
88+
>>> await async_client.report({'ip_address': '152.216.7.110', 'tag': 'chargeback'})
8989
9090
The method takes a dictionary representing the report to be sent to the web
9191
service. The structure of this dictionary should be in `the format specified
@@ -141,7 +141,7 @@ Score, Insights and Factors Example
141141
>>>
142142
>>> request = {
143143
>>> 'device': {
144-
>>> 'ip_address': '81.2.69.160',
144+
>>> 'ip_address': '152.216.7.110',
145145
>>> 'accept_language': 'en-US,en;q=0.8',
146146
>>> 'session_age': 3600,
147147
>>> 'session_id': 'a333a4e127f880d8820e56a66f40717c',
@@ -172,7 +172,7 @@ Score, Insights and Factors Example
172172
>>> 'country': 'US',
173173
>>> 'postal': '06510',
174174
>>> 'phone_country_code': '1',
175-
>>> 'phone_number': '323-123-4321',
175+
>>> 'phone_number': '123-456-7890',
176176
>>> },
177177
>>> 'shipping': {
178178
>>> 'first_name': 'John',
@@ -185,17 +185,17 @@ Score, Insights and Factors Example
185185
>>> 'country': 'US',
186186
>>> 'postal': '06510',
187187
>>> 'phone_country_code': '1',
188-
>>> 'phone_number': '403-321-2323',
188+
>>> 'phone_number': '123-456-0000',
189189
>>> 'delivery_speed': 'same_day',
190190
>>> },
191191
>>> 'credit_card': {
192192
>>> 'bank_phone_country_code': '1',
193193
>>> 'avs_result': 'Y',
194-
>>> 'bank_phone_number': '800-342-1232',
194+
>>> 'bank_phone_number': '123-456-1234',
195195
>>> 'last_4_digits': '7643',
196196
>>> 'cvv_result': 'N',
197197
>>> 'bank_name': 'Bank of No Hope',
198-
>>> 'issuer_id_number': '323132'
198+
>>> 'issuer_id_number': '411111'
199199
>>> },
200200
>>> 'payment': {
201201
>>> 'decline_code': 'invalid number',
@@ -271,7 +271,7 @@ For synchronous reporting:
271271
>>>
272272
>>> with Client(42, 'licensekey') as client
273273
>>> transaction_report = {
274-
>>> 'ip_address': '81.2.69.160',
274+
>>> 'ip_address': '152.216.7.110',
275275
>>> 'tag': 'chargeback',
276276
>>> 'minfraud_id': '2c69df73-01c0-45a5-b218-ed85f40b17aa',
277277
>>> }
@@ -287,7 +287,7 @@ For asynchronous reporting:
287287
>>> async def report():
288288
>>> async with AsyncClient(42, 'licensekey') as client
289289
>>> transaction_report = {
290-
>>> 'ip_address': '81.2.69.160',
290+
>>> 'ip_address': '152.216.7.110',
291291
>>> 'tag': 'chargeback',
292292
>>> 'minfraud_id': '2c69df73-01c0-45a5-b218-ed85f40b17aa',
293293
>>> }

tests/data/factors-response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
],
9090
"traits": {
9191
"domain": "in-addr.arpa",
92-
"ip_address": "81.2.69.160",
92+
"ip_address": "152.216.7.110",
9393
"is_anonymous": true,
9494
"is_anonymous_vpn": true,
9595
"is_hosting_provider": true,

tests/data/full-report-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"ip_address": "81.2.69.160",
2+
"ip_address": "152.216.7.110",
33
"tag": "chargeback",
44
"chargeback_code": "UA01 Fraud - Card Present Transaction",
55
"maxmind_id": "a1b2c3d4",

tests/data/full-transaction-request.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"region": "CT",
2424
"country": "US",
2525
"postal": "06510",
26-
"phone_number": "323-123-4321",
26+
"phone_number": "123-456-7890",
2727
"phone_country_code": "1"
2828
},
2929
"shipping": {
@@ -36,7 +36,7 @@
3636
"region": "OK",
3737
"country": "US",
3838
"postal": "73003",
39-
"phone_number": "403-321-2323",
39+
"phone_number": "123-456-0000",
4040
"phone_country_code": "1",
4141
"delivery_speed": "same_day"
4242
},
@@ -46,11 +46,11 @@
4646
"decline_code": "invalid number"
4747
},
4848
"credit_card": {
49-
"issuer_id_number": "323132",
49+
"issuer_id_number": "411111",
5050
"last_4_digits": "7643",
5151
"bank_name": "Bank of No Hope",
5252
"bank_phone_country_code": "1",
53-
"bank_phone_number": "800-342-1232",
53+
"bank_phone_number": "123-456-1234",
5454
"avs_result": "Y",
5555
"cvv_result": "N",
5656
"token": "123456abc1234"
@@ -80,7 +80,7 @@
8080
}
8181
],
8282
"device": {
83-
"ip_address": "81.2.69.160",
83+
"ip_address": "152.216.7.110",
8484
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36",
8585
"accept_language": "en-US,en;q=0.8",
8686
"session_id": "foobar",

tests/data/insights-response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
],
9090
"traits": {
9191
"domain": "in-addr.arpa",
92-
"ip_address": "81.2.69.160",
92+
"ip_address": "152.216.7.110",
9393
"is_anonymous": true,
9494
"is_anonymous_vpn": true,
9595
"is_hosting_provider": true,

tests/test_webservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def test_200(self):
200200
def test_200_on_request_with_nones(self):
201201
model = self.create_success(
202202
request={
203-
"device": {"ip_address": "81.2.69.160", "accept_language": None},
203+
"device": {"ip_address": "152.216.7.110", "accept_language": None},
204204
"event": {"shop_id": None},
205205
"shopping_cart": [
206206
{

0 commit comments

Comments
 (0)