Fixed tests to include new test_environment include
Enforce error reporting during testing
fixed a broken assertion for a config test
check the index is set before checking it's value.