示例#1
0
文件: feature_test.py 项目: gnott/h
    def test_all_only_returns_current_flags(self, db_session):
        """The .all() method should only return named current feature flags."""
        new, pending, old = [Feature(name='notification'),
                             Feature(name='abouttoberemoved'),
                             Feature(name='somethingelse')]
        db_session.add_all([new, pending, old])
        db_session.flush()

        features = Feature.all(db_session)

        assert len(features) == 1
        assert features[0].name == 'notification'
示例#2
0
    def test_all_only_returns_current_flags(self, db_session):
        """The .all() method should only return named current feature flags."""
        new, pending, old = [
            Feature(name='notification'),
            Feature(name='abouttoberemoved'),
            Feature(name='somethingelse')
        ]
        db_session.add_all([new, pending, old])
        db_session.flush()

        features = Feature.all(db_session)

        assert len(features) == 1
        assert features[0].name == 'notification'
示例#3
0
    def test_all_creates_annotations_that_dont_exist(self, db_session):
        features = Feature.all(db_session)

        assert len(features) == 1
        assert features[0].name == 'notification'
示例#4
0
文件: feature_test.py 项目: gnott/h
    def test_all_creates_annotations_that_dont_exist(self, db_session):
        features = Feature.all(db_session)

        assert len(features) == 1
        assert features[0].name == 'notification'