Skip to content

Commit a6a7df6

Browse files
committed
new file: .travis.yml
1 parent 9dc8dae commit a6a7df6

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

.travis.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: python
2+
3+
cache: pip
4+
5+
matrix:
6+
include:
7+
8+
- name: "3.8"
9+
python: "3.8"
10+
11+
12+
before_install:
13+
- set -e
14+
- make -v
15+
16+
17+
script:
18+
- make test

src/epp/commands/domain.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
<domain:registrant>%s</domain:registrant>"""
1414

1515

16-
single_nameserver = " <domain:ns><domain:hostObj>%s</domain:hostObj></domain:ns>"
16+
single_nameserver = " <domain:ns><domain:hostObj>%s</domain:hostObj></domain:ns>"
17+
18+
single_nameserver2 = " <domain:ns><domain:hostObj>%s</domain:hostObj></domain:ns>"
1719

1820

1921
auth_info = """ <domain:authInfo><domain:pw>%s</domain:pw></domain:authInfo>

src/epp/epp_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ def domain_update(self, domain_name, auth_info=None,
416416
domain_name=domain_name,
417417
auth_info='' if not auth_info else commands.domain.auth_info2 % auth_info,
418418
add_nameservers='\n'.join([
419-
commands.domain.single_nameserver % ns for ns in add_nameservers
419+
commands.domain.single_nameserver2 % ns for ns in add_nameservers
420420
]),
421421
remove_nameservers='\n'.join([
422-
commands.domain.single_nameserver % ns for ns in remove_nameservers
422+
commands.domain.single_nameserver2 % ns for ns in remove_nameservers
423423
]),
424424
add_contacts='\n'.join([
425425
commands.domain.single_contact2 % c for c in add_contacts

tests/epp/test_rpc_server.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,20 @@ def test_cmd_domain_transfer(self):
845845
<domain:reDate>2021-04-30T13:30:18.035Z</domain:reDate><domain:acID>registrar_01</domain:acID>
846846
<domain:acDate>2021-04-30T13:30:18.35Z</domain:acDate><domain:exDate>2026-07-05T07:37:32.152Z</domain:exDate></domain:trnData></resData>
847847
<trID><clTRID>c5bc8f94103f1a47019a09049dff5aec</clTRID><svTRID>1619789418042</svTRID></trID></response></epp>''',
848-
json_response={
849-
},
848+
json_response={'epp': {
849+
'@{http://www.w3.org/2001/XMLSchema-instance}schemaLocation': 'urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd',
850+
'response': {'msgQ': {'@count': '9', '@id': '792'},
851+
'resData': {'trnData': {
852+
'@{http://www.w3.org/2001/XMLSchema-instance}schemaLocation': 'urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd',
853+
'acDate': '2021-04-30T13:30:18.35Z',
854+
'acID': 'registrar_01',
855+
'exDate': '2026-07-05T07:37:32.152Z',
856+
'name': 'atest51.tld',
857+
'reDate': '2021-04-30T13:30:18.035Z',
858+
'reID': 'registrar_02',
859+
'trStatus': 'serverApproved',
860+
}, },
861+
'result': {'@code': '1000', 'msg': 'Command completed successfully'},
862+
'trID': {'clTRID': 'c5bc8f94103f1a47019a09049dff5aec', 'svTRID': '1619789418042'}, },
863+
}, },
850864
)

0 commit comments

Comments
 (0)