mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
removed explicit object inheritance (#6686)
* removed explicit object inheritance * minor fix * pr comments --------- Co-authored-by: Andrew Chubatiuk <andrew.chubatiuk@motional.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from redash.utils import gen_query_hash, utcnow
|
||||
from redash.utils.configuration import ConfigurationContainer
|
||||
|
||||
|
||||
class ModelFactory(object):
|
||||
class ModelFactory:
|
||||
def __init__(self, model, **kwargs):
|
||||
self.model = model
|
||||
self.kwargs = kwargs
|
||||
@@ -30,7 +30,7 @@ class ModelFactory(object):
|
||||
return obj
|
||||
|
||||
|
||||
class Sequence(object):
|
||||
class Sequence:
|
||||
def __init__(self, string):
|
||||
self.sequence = 0
|
||||
self.string = string
|
||||
@@ -172,7 +172,7 @@ query_snippet_factory = ModelFactory(
|
||||
)
|
||||
|
||||
|
||||
class Factory(object):
|
||||
class Factory:
|
||||
def __init__(self):
|
||||
self.org, self.admin_group, self.default_group = redash.models.init_db()
|
||||
self._data_source = None
|
||||
|
||||
@@ -6,7 +6,7 @@ from werkzeug.exceptions import BadRequest
|
||||
from redash.handlers.base import paginate
|
||||
|
||||
|
||||
class DummyResults(object):
|
||||
class DummyResults:
|
||||
items = [i for i in range(25)]
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class TestUserListResourcePost(BaseTestCase):
|
||||
|
||||
class TestUserListGet(BaseTestCase):
|
||||
def create_filters_fixtures(self):
|
||||
class PlainObject(object):
|
||||
class PlainObject:
|
||||
pass
|
||||
|
||||
result = PlainObject()
|
||||
|
||||
@@ -6,7 +6,7 @@ from redash import models, settings
|
||||
from tests import BaseTestCase, authenticated_user
|
||||
|
||||
|
||||
class AuthenticationTestMixin(object):
|
||||
class AuthenticationTestMixin:
|
||||
def test_returns_404_when_not_unauthenticated(self):
|
||||
for path in self.paths:
|
||||
rv = self.client.get(path)
|
||||
|
||||
Reference in New Issue
Block a user