Skip to content

Commit

Permalink
Fix tests failing in master (#4759)
Browse files Browse the repository at this point in the history
* clean ESes

* compare set to set

* print data on travis

* Cuyahoga Falls -> Tallmadge

* remove weird casts
  • Loading branch information
danlipert authored Jul 10, 2019
1 parent bc68c7a commit 750e86a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,21 @@ def test_bounty_index_terms(self):
index_terms = bounty_index_terms(self.bounty)
assert len(index_terms) == 15
assert 'USDT' in index_terms
assert set([self.bounty_payer_handle, self.bounty_earner_handle, 'gitcoinco']).issubset(set(index_terms))
assert set(['Cuyahoga Falls', 'United States', 'North America']).issubset(set(index_terms))
assert set(['London', 'United Kingdom', 'Europe']).issubset(set(index_terms))
assert set(['Australia', 'Oceania']).issubset(set(index_terms))
assert set(['python', 'shell']).issubset(set(index_terms))
assert {self.bounty_payer_handle, self.bounty_earner_handle, 'gitcoinco'}.issubset(set(index_terms))
assert {'Tallmadge', 'United States', 'North America'}.issubset(set(index_terms))
assert {'London', 'United Kingdom', 'Europe'}.issubset(set(index_terms))
assert {'Australia', 'Oceania'}.issubset(set(index_terms))
assert {'python', 'shell'}.issubset(set(index_terms))

def test_tip_index_terms(self):
"""Test tip index terms list."""
index_terms = tip_index_terms(self.tip)

assert len(index_terms) == 10
assert 'USDT' in index_terms
assert set([self.tip_payer_handle, self.tip_earner_handle, 'gitcoinco']).issubset(set(index_terms))
assert set(['Cuyahoga Falls', 'United States', 'North America']).issubset(set(index_terms))
assert set(['London', 'United Kingdom', 'Europe']).issubset(set(index_terms))
assert {self.tip_payer_handle, self.tip_earner_handle, 'gitcoinco'}.issubset(set(index_terms))
assert {'Tallmadge', 'United States', 'North America'}.issubset(set(index_terms))
assert {'London', 'United Kingdom', 'Europe'}.issubset(set(index_terms))

def test_sum_bounties_payer(self):
"""Test sum bounties leaderboards."""
Expand Down
2 changes: 2 additions & 0 deletions app/marketing/tests/test_marketing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class MarketingEmailUtilsTest(TestCase):

def setUp(self):
"""Perform setup for the testcase."""
test_es = EmailSubscriber.objects.all().delete()

EmailSubscriber.objects.create(
email='[email protected]',
source='mysource',
Expand Down

0 comments on commit 750e86a

Please sign in to comment.