Skip to content

Commit

Permalink
make allAssets test more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
cjshaw committed Apr 4, 2017
1 parent 12fa01f commit 5ac9839
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,23 +845,29 @@ def test_can_get_assets_from_all_repositories(self):
len(asset_1['assetContents']),
1
)
self.assertEqual(
possible_ac_types = ['asset-content-genus-type%3Amp4%40ODL.MIT.EDU',
'asset-content-genus-type%3Avtt%40ODL.MIT.EDU']
self.assertIn(
asset_1['assetContents'][0]['genusTypeId'],
'asset-content-genus-type%3Amp4%40ODL.MIT.EDU'
possible_ac_types
)
asset_2 = data[1]
self.assertEqual(
len(asset_2['assetContents']),
1
)
self.assertEqual(
self.assertIn(
asset_2['assetContents'][0]['genusTypeId'],
'asset-content-genus-type%3Avtt%40ODL.MIT.EDU'
possible_ac_types
)
self.assertNotEqual(
asset_1['assignedRepositoryIds'][0],
asset_2['assignedRepositoryIds'][0]
)
self.assertNotEqual(
asset_1['assetContents'][0]['genusTypeId'],
asset_2['assetContents'][0]['genusTypeId']
)


class AssetCRUDTests(BaseRepositoryTestCase):
Expand Down

0 comments on commit 5ac9839

Please sign in to comment.