コード例 #1
0
    def test_delete(self, init_db, new_risk_type):
        """
            Test that a new risk-type gets deleted

            Args:
                init_db(SQLAlchemy): fixture to initialize the test database
                new_risk_type (RiskType): Fixture to create a new risk-type
        """
        new_risk_type.delete()
        assert RiskType.get(new_risk_type.id) is None
コード例 #2
0
    def test_get(self, init_db, new_risk_type):
        """
            Test that a new risk-type gets fetched

            Args:
                init_db(SQLAlchemy): fixture to initialize the test database
                new_risk_type (RiskType): Fixture to create a new risk-type
        """

        assert RiskType.get(new_risk_type.id) == new_risk_type