def test_min(self): pending_app = app_factory( status=mkt.STATUS_PENDING, file_kw={'status': mkt.STATUS_PENDING}, version_kw={'nomination': self.days_ago(42)}) pos = helpers.get_position(pending_app) eq_(pos['days'], 1)
def test_min(self): pending_app = amo.tests.app_factory( status=amo.STATUS_PENDING, file_kw={'status': amo.STATUS_PENDING}, version_kw={'nomination': self.days_ago(42)}) pos = helpers.get_position(pending_app) eq_(pos['days'], 1)
def _test_position(self, app): app.latest_version.update(nomination=self.days_ago(2)) pos = helpers.get_position(app) # We set the nomination to 2 days ago. eq_(pos['days_in_queue'], 2) # There are three pending apps. eq_(pos['total'], 3) # It took 12 days for 2 apps to get reviewed, giving us an average of # 6 days to go from pending->public, but we've already waited 2 days. eq_(pos['days'], 4) # There is one pending app in front of us. eq_(pos['pos'], 2)