Пример #1
0
def test_check_model_factory():
    @model.model
    def model_factory():
        pass

    assert model._check_model(model_factory)
Пример #2
0
def test_check_decorated_model():
    @model.model
    class ReallyAModel(model.Model):
        pass

    assert model._check_model(ReallyAModel)
Пример #3
0
def test_check_undecorated_model():
    class NotReallyAModel(model.Model):
        pass

    assert model._check_model(NotReallyAModel) is False
Пример #4
0
def test_check_model_factory():
    @model.model
    def model_factory():
        pass

    assert model._check_model(model_factory)
Пример #5
0
def test_check_decorated_model():
    @model.model
    class ReallyAModel(model.Model):
        pass

    assert model._check_model(ReallyAModel)
Пример #6
0
def test_check_undecorated_model():
    class NotReallyAModel(model.Model):
        pass

    assert model._check_model(NotReallyAModel) is False