def test_should_allow_to_set_short_ccy_limit_and_unset_long_limit(self): rm = CcyExposureLimitRiskEvaluator('BC', self.cache) rm.set_limit('SHF_USD', ccy_limit=10000) self.assertEquals(rm.ccy_limits['SHF_USD'], 10000) rm.set_limit('SHF_USD', ccy_limit_short=-22) self.assertEquals(rm.ccy_limits_short['SHF_USD'], -22) self.assertFalse('SHF_USD' in rm.ccy_limits)
def test_should_allow_to_set_short_ccy_limit_and_unset_long_limit(self): rm = CcyExposureLimitRiskEvaluator('BC', self.cache) rm.set_limit('SHF_USD', ccy_limit=10000) self.assertEquals(rm.ccy_limits['SHF_USD'], 10000) rm.set_limit('SHF_USD', ccy_limit_short=-22) self.assertEquals(rm.ccy_limits_short['SHF_USD'], -22) self.assertFalse('SHF_USD' in rm.ccy_limits)
def test_should_allow_to_set_short_ccy_limit_and_have_expected_value(self): rm = CcyExposureLimitRiskEvaluator('BC', self.cache, ccy_limits={}) rm.set_limit('CHF', ccy_limit_short=-1234.5) self.assertEquals(rm.ccy_limits_short['CHF'], -1234.5)
def test_should_allow_to_set_short_ccy_limit_and_have_expected_value(self): rm = CcyExposureLimitRiskEvaluator('BC', self.cache, ccy_limits={}) rm.set_limit('CHF', ccy_limit_short=-1234.5) self.assertEquals(rm.ccy_limits_short['CHF'], -1234.5)