Exemplo n.º 1
0
    def test_sets_new_value_for_same_key(self):

        config = factories.SystemInfo()
        config = factories.SystemInfo()

        new_config = (model.Session.query(SystemInfo).filter_by(
            key=config.key).first())

        assert config.id == new_config.id

        assert config.id == new_config.id
Exemplo n.º 2
0
    def test_does_not_set_same_value_for_same_key(self):

        config = factories.SystemInfo()

        set_system_info(config.key, config.value)

        new_config = (model.Session.query(SystemInfo).filter_by(
            key=config.key).first())

        assert config.id == new_config.id
Exemplo n.º 3
0
    def test_does_not_set_same_value_for_same_key(self):

        config = factories.SystemInfo()

        set_system_info(config.key, config.value)

        new_config = model.Session.query(SystemInfo) \
                                  .filter_by(key=config.key).first()

        assert_equals(config.id, new_config.id)
        assert_equals(config.revision_id, new_config.revision_id)