diff --git a/app/dashboard/tests/test_dashboard_helpers.py b/app/dashboard/tests/test_dashboard_helpers.py index 94be6fe8342..a1abca6344b 100644 --- a/app/dashboard/tests/test_dashboard_helpers.py +++ b/app/dashboard/tests/test_dashboard_helpers.py @@ -41,14 +41,14 @@ def setUp(self): def test_amount(self): """Test the dashboard helper amount method.""" - params = { 'amount': '5', 'denomination': 'ETH' } + params = {'amount': '5', 'denomination': 'ETH'} request = self.factory.get('/sync/get_amount', params) assert amount(request).content == b'{"eth": 5.0, "usdt": 10.0}' def test_title(self): """Test the dashboard helper title method.""" sample_url = 'https://github.com/gitcoinco/web/issues/353' - params = { 'url': sample_url, 'denomination': 'ETH' } + params = {'url': sample_url, 'denomination': 'ETH'} with requests_mock.Mocker() as m: m.get(sample_url, text='Increase Code Coverage by 4%') request = self.factory.get('/sync/get_issue_title', params) @@ -57,7 +57,7 @@ def test_title(self): def test_description(self): """Test the dashboard helper description method.""" sample_url = 'https://github.com/gitcoinco/web/issues/353' - params = { 'url': sample_url } + params = {'url': sample_url} with requests_mock.Mocker() as m: m.get('https://api.github.com/repos/gitcoinco/web/issues/353', text='{"body": "This bounty will be paid out to anyone who meaningfully increases the code coverage of the repository by 4%."}') request = self.factory.get('/sync/get_issue_description', params) @@ -66,7 +66,7 @@ def test_description(self): def test_keywords(self): """Test the dashboard helper keywords method.""" sample_url = 'https://github.com/gitcoinco/web/issues/353' - params = { 'url': sample_url } + params = {'url': sample_url} with requests_mock.Mocker() as m: m.get('https://github.com/gitcoinco/web', text='helloworld') request = self.factory.get('/sync/get_issue_keywords', params) diff --git a/app/dashboard/tests/test_dashboard_models.py b/app/dashboard/tests/test_dashboard_models.py index 55520f4657a..87f8292bd2f 100644 --- a/app/dashboard/tests/test_dashboard_models.py +++ b/app/dashboard/tests/test_dashboard_models.py @@ -54,7 +54,7 @@ def test_bounty(self): accepted=True, expires_date=datetime(2008, 11, 30), fulfiller_address="0x0000000000000000000000000000000000000000", - idx_project_length = 5, + idx_project_length=5, bounty_type='Feature', experience_level='Intermediate', ) @@ -63,17 +63,17 @@ def test_bounty(self): assert bounty.title_or_desc == 'foo' assert bounty.issue_description_text == 'hello world' assert bounty.org_name == 'gitcoinco' - assert bounty.is_hunter('fred') == True - assert bounty.is_hunter('flintstone') == False - assert bounty.is_funder('fred') == False - assert bounty.is_funder('flintstone') == True + assert bounty.is_hunter('fred') is True + assert bounty.is_hunter('flintstone') is False + assert bounty.is_funder('fred') is False + assert bounty.is_funder('flintstone') is True assert bounty.get_avatar_url assert bounty.status == 'expired' assert bounty.value_true == 3e-18 assert bounty.value_in_eth == 3 assert bounty.value_in_usdt == 0 assert 'ago 5 Feature Intermediate' in bounty.desc - assert bounty.is_legacy == False + assert bounty.is_legacy is False assert bounty.get_github_api_url() == 'https://api.github.com/repos/gitcoinco/web' def test_tip(self): @@ -125,7 +125,7 @@ def test_profile(self): repos_data=[{'contributors': [{'contributions': 50, 'login': 'foo'}]}], ) assert str(profile) == 'gitcoinco' - assert profile.is_org == True + assert profile.is_org is True assert profile.bounties.first() == bounty assert profile.tips.first() == tip assert profile.authors == ['foo', 'gitcoinco']