def test_dividend_yield_preferred(self):
     stock1 = Stock("GOOG",
                    stock_type='preferred',
                    fixed_dividend=10,
                    par_value=2)
     divi_yield = stock1.dividend_yield(200)
     self.assertEqual(divi_yield, (10 * 2) / 200.)
 def test_dividend_yield_preferred(self):
     stock1 = Stock("GOOG", stock_type='preferred', fixed_dividend=10, par_value=2)
     divi_yield = stock1.dividend_yield(200)
     self.assertEqual(divi_yield, (10*2)/200.)
 def test_dividend_yield_common(self):
     stock1 = Stock("GOOG", last_dividend=10)
     divi_yield = stock1.dividend_yield(200)
     self.assertEqual(divi_yield, 10/200.)
 def test_dividend_yield_common(self):
     stock1 = Stock("GOOG", last_dividend=10)
     divi_yield = stock1.dividend_yield(200)
     self.assertEqual(divi_yield, 10 / 200.)