Skip to content

Commit

Permalink
Merge pull request #15 from sasha-kantoriz/internal_test
Browse files Browse the repository at this point in the history
Create file with data for resources testing
  • Loading branch information
leits committed Sep 1, 2017
2 parents e087497 + 81e0f7b commit dc42589
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 8 deletions.
8 changes: 0 additions & 8 deletions openregistry/api/tests/blanks/document.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# -*- coding: utf-8 -*-


test_document_data = {
# 'url': self.generate_docservice_url(),
'title': u'укр.doc',
'hash': 'md5:' + '0' * 32,
'format': 'application/msword',
}


def not_found(self):
response = self.app.get('/some_id/documents', status=404)
self.assertEqual(response.status, '404 Not Found')
Expand Down
65 changes: 65 additions & 0 deletions openregistry/api/tests/blanks/json_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
from copy import deepcopy


test_organization = {
"name": u"Державне управління справами",
"identifier": {
"scheme": u"UA-EDR",
"id": u"00037256",
"uri": u"http://www.dus.gov.ua/"
},
"address": {
"countryName": u"Україна",
"postalCode": u"01220",
"region": u"м. Київ",
"locality": u"м. Київ",
"streetAddress": u"вул. Банкова, 11, корпус 1"
},
"contactPoint": {
"name": u"Державне управління справами",
"telephone": u"0440000000"
}
}

test_document_data = {
# 'url': self.generate_docservice_url(),
'title': u'укр.doc',
'hash': 'md5:' + '0' * 32,
'format': 'application/msword',
}

test_asset_data = {
"title": u"Земля для космодрому",
"assetType": "basic",
"assetCustodian": deepcopy(test_organization),
"classification": {
"scheme": u"CPV",
"id": u"37452200-3",
"description": u"Земельні ділянки"
},
"unit": {
"name": u"item",
"code": u"44617100-9"
},
"quantity": 5,
"address": {
"countryName": u"Україна",
"postalCode": "79000",
"region": u"м. Київ",
"locality": u"м. Київ",
"streetAddress": u"вул. Банкова 1"
},
"value": {
"amount": 100,
"currency": u"UAH"
},
}

test_lot_data = {
"title": u"Тестовий лот",
"description": u"Щось там тестове",
"lotType": "basic",
"lotCustodian": deepcopy(test_organization),
"assets": []
}

0 comments on commit dc42589

Please sign in to comment.