diff --git a/test/pystorm/test_component.py b/test/pystorm/test_component.py
index <HASH>..<HASH> 100644
--- a/test/pystorm/test_component.py
+++ b/test/pystorm/test_component.py
@@ -259,9 +259,10 @@ class ComponentTests(unittest.TestCase):
                   "end\n"]
         component = Component(input_stream=BytesIO(''.join(inputs).encode('utf-8')),
                               output_stream=BytesIO())
+        component.exit_on_exception = True
         with self.assertRaises(SystemExit) as raises_fixture:
             component.run()
-            assert raises_fixture.exception.value == 1
+        assert raises_fixture.exception.code == 1
 
     @patch.object(Component, '_run', autospec=True)
     def test_exit_on_exception_false(self, _run_mock):
@@ -280,7 +281,7 @@ class ComponentTests(unittest.TestCase):
         component.exit_on_exception = False
         with self.assertRaises(SystemExit) as raises_fixture:
             component.run()
-            assert raises_fixture.exception.value == 2
+        assert raises_fixture.exception.code == 2
 
     @patch.object(Component, '_handle_run_exception', autospec=True)
     @patch('pystorm.component.log', autospec=True)
Fix a couple stupid test mistakes where things weren't actually being tested.