def test_find_default_import_path(test_apps, monkeypatch, tmpdir):
 monkeypatch.delitem(os.environ, 'FLASK_APP', raising=False)
 assert (find_default_import_path() == None)
 monkeypatch.setitem(os.environ, 'FLASK_APP', 'notanapp')
 assert (find_default_import_path() == 'notanapp')
 tmpfile = tmpdir.join('testapp.py')
 tmpfile.write('')
 monkeypatch.setitem(os.environ, 'FLASK_APP', str(tmpfile))
 expect_rv = prepare_exec_for_file(str(tmpfile))
 assert (find_default_import_path() == expect_rv)

def test_find_default_import_path ( test_apps , monkeypatch , tmpdir ) : monkeypatch . delitem ( os . environ , 'FLASK_APP' , raising = False ) assert ( find_default_import_path ( ) == None ) monkeypatch . setitem ( os . environ , 'FLASK_APP' , 'notanapp' ) assert ( find_default_import_path ( ) == 'notanapp' ) tmpfile = tmpdir . join ( 'testapp.py' ) tmpfile . write ( '' ) monkeypatch . setitem ( os . environ , 'FLASK_APP' , str ( tmpfile ) ) expect_rv = prepare_exec_for_file ( str ( tmpfile ) ) assert ( find_default_import_path ( ) == expect_rv )
test of find_default_import_path .