Skip to content

Commit

Permalink
add owner transfer support (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav authored and leits committed Jun 19, 2018
1 parent a6ca8c4 commit d9c3bce
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
13 changes: 12 additions & 1 deletion openregistry/assets/basic/tests/base.py
Expand Up @@ -6,7 +6,8 @@
BaseAssetWebTest as BaseAWT,
test_asset_basic_data,
connection_mock_config,
MOCK_CONFIG as BASE_MOCK_CONFIG
MOCK_CONFIG as BASE_MOCK_CONFIG,
AssetTransferWebTest as AssetTWT
)


Expand All @@ -27,6 +28,16 @@ def setUp(self):
super(BaseAssetWebTest, self).setUp()


class AssetTransferWebTest(AssetTWT):
initial_auth = ('Basic', ('broker', ''))
relative_to = os.path.dirname(__file__)
mock_config = MOCK_CONFIG

def setUp(self):
self.initial_data = deepcopy(test_asset_basic_data)
super(AssetTransferWebTest, self).setUp()


class AssetContentWebTest(BaseAssetWebTest):
init = True
initial_status = 'pending'
Expand Down
3 changes: 2 additions & 1 deletion openregistry/assets/basic/tests/main.py
Expand Up @@ -2,13 +2,14 @@

import unittest

from openregistry.assets.basic.tests import asset, document
from openregistry.assets.basic.tests import asset, document, transferring


def suite():
tests = unittest.TestSuite()
tests.addTest(asset.suite())
tests.addTest(document.suite())
tests.addTest(transferring.suite())
return tests


Expand Down
19 changes: 19 additions & 0 deletions openregistry/assets/basic/tests/transferring.py
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
import unittest

from openregistry.assets.basic.tests.base import AssetTransferWebTest
from openregistry.assets.core.tests.plugins.transferring.mixins import AssetOwnershipChangeTestCaseMixin

class AssetOwnershipChangeTest(AssetTransferWebTest,
AssetOwnershipChangeTestCaseMixin):
pass


def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(AssetOwnershipChangeTest))
return suite


if __name__ == "__main__":
unittest.main(defaultTest="suite")

0 comments on commit d9c3bce

Please sign in to comment.