def test_core_styles(self, get_app): mock_app = MagicMock(name='Application') mock_app.get_styles.return_value = ['test.css'] get_app.return_value = mock_app result = list(application.application_stylesheets()['styles']()) self.assertEqual(['test.css'], result) mock_app.get_styles.assert_called_with()
def test_core_styles_with_scss(self, get_app): mock_app = MagicMock(name='Application') mock_app.get_styles.return_value = ['test.scss'] get_app.return_value = mock_app result = list(application.application_stylesheets()['styles']()) self.assertEqual([("test.scss", "text/x-scss",)], result) mock_app.get_styles.assert_called_with()