change logic for tty resize to avoid warning in tests
Merge pull request #2384 from dotcloud/suppress_warning_tty_tests

Change logic for tty resize to avoid warning in tests