Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Aug 1, 2018
1 parent deea05d commit d7f6535
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
'plone.indexer',
'plone.memoize',
'plone.namedfile',
'plone.portlets',
'plone.protect >= 3.0.26',
'plone.restapi',
'plone.supermodel',
Expand Down
1 change: 0 additions & 1 deletion src/brasil/gov/portal/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<dependency>profile-plone.app.theming:default</dependency>
<dependency>profile-brasil.gov.agenda:default</dependency>
<dependency>profile-brasil.gov.barra:default</dependency>
<dependency>profile-brasil.gov.portlets:default</dependency>
<dependency>profile-brasil.gov.vcge.at:default</dependency>
<dependency>profile-brasil.gov.vcge.dx:default</dependency>
<dependency>profile-plone.restapi:default</dependency>
Expand Down
16 changes: 3 additions & 13 deletions src/brasil/gov/portal/tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
INSTALLED = {
'brasil.gov.agenda',
'brasil.gov.barra',
# 'brasil.gov.portlets',
'brasil.gov.tiles',
'brasil.gov.vcge',
'collective.cover',
Expand All @@ -29,6 +28,7 @@
}

INSTALLABLE = {
'brasil.gov.portlets',
'collective.fingerpointing',
'collective.lazysizes',
'collective.liveblog',
Expand All @@ -55,30 +55,20 @@ def test_browser_layer(self):
def test_installed(self):
self.assertTrue(self.qi.isProductInstalled(PROJECTNAME))

@unittest.expectedFailure
def test_installed_dependencies(self):
# XXX: this needs to be refactored as portal_quickinstaller
# is no longer the canonical way of getting reliable
# information on dependencies
expected = INSTALLED
actual = {
p['id'] for p in self.qi.listInstalledProducts()
if p['id'] != PROJECTNAME}
# XXX: for some unknown reason portal_quickinstaller lists
# collective.portlet.calendar as installed
actual = actual - {'collective.portlet.calendar'}
self.assertEqual(
expected, actual, 'Not installed: ' + ', '.join(actual - expected))
self.assertEqual(expected, actual)

@unittest.expectedFailure
def test_installable_dependencies(self):
# XXX: this needs to be refactored as portal_quickinstaller
# is no longer the canonical way of getting reliable
# information on dependencies
expected = INSTALLABLE
actual = {p['id'] for p in self.qi.listInstallableProducts()}
self.assertEqual(
expected, actual, 'Missing: ' + ', '.join(actual - expected))
self.assertEqual(expected, actual)

def test_add_infographic_permission(self):
permission = 'brasil.gov.portal: Add Infographic'
Expand Down

0 comments on commit d7f6535

Please sign in to comment.