Skip to content

Commit

Permalink
fixes bug 1380761 - Deprecate AduBySignature (#3920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Bengtsson authored Aug 16, 2017
1 parent 141d10b commit 0c04b42
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 270 deletions.
74 changes: 0 additions & 74 deletions socorro/external/postgresql/crashes.py

This file was deleted.

120 changes: 0 additions & 120 deletions socorro/unittest/external/postgresql/test_crashes.py

This file was deleted.

27 changes: 0 additions & 27 deletions webapp-django/crashstats/crashstats/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
)
import socorro.external.postgresql.platforms
import socorro.external.postgresql.bugs
import socorro.external.postgresql.crashes
import socorro.external.postgresql.products
import socorro.external.postgresql.graphics_devices
import socorro.external.postgresql.crontabber_state
Expand Down Expand Up @@ -1078,32 +1077,6 @@ def get_pairs(self, adapter_hexes, vendor_hexes):
return names


class AduBySignature(SocorroMiddleware):

implementation = socorro.external.postgresql.crashes.AduBySignature

deprecation_warning = (
'This endpoint is deprecated and will soon cease to exist.\n'
'Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1380761'
)

required_params = (
'product_name',
'signature',
'channel',
)

possible_params = (
('start_date', datetime.date),
('end_date', datetime.date),
)

API_WHITELIST = (
'hits',
'total',
)


class ADI(SocorroMiddleware):

implementation = socorro.external.postgresql.adi.ADI
Expand Down
49 changes: 0 additions & 49 deletions webapp-django/crashstats/crashstats/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,55 +395,6 @@ def mocked_post(**params):
})
eq_(r, True)

@mock.patch('requests.get')
def test_adu_by_signature(self, rget):
model = models.AduBySignature
api = model()

def mocked_get(**options):
ok_('product_name' in options)
eq_(options['product_name'], 'WaterWolf')

ok_('signature' in options)
eq_(options['signature'], 'FakeSignature1')

ok_('channel' in options)
eq_(options['channel'], 'nightly')

return {
'hits': [
{
'build_date': '2014-04-01',
'os_name': 'Windows',
'buildid': '20140401000000',
'adu_count': 1,
'crash_count': 1,
'adu_date': '2014-04-01',
'signature': 'FakeSignature1',
'channel': 'nightly'},
{
'build_date': '2014-04-01',
'os_name': 'Windows',
'buildid': '20140401000001',
'adu_count': 2,
'crash_count': 2,
'adu_date': '2014-04-01',
'signature': 'FakeSignature2',
'channel': 'nightly'
},
],
'total': 2,
}

models.AduBySignature.implementation().get.side_effect = mocked_get

r = api.get(
product_name='WaterWolf',
signature='FakeSignature1',
channel='nightly',
)
eq_(r['total'], 2)

def test_platforms(self):
api = models.Platforms()

Expand Down

0 comments on commit 0c04b42

Please sign in to comment.