zacc/gaia-ui-tests — pull request #38 by bebef1987 (2012-11-14 14:59:08+00:00)
Title: Wifi api for future tests 

tested with something like:

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from gaiatest import GaiaTestCase
import time

class TestWifi(GaiaTestCase):

def setUp(self):

GaiaTestCase.setUp(self)

# unlock the lockscreen if it's locked
self.assertTrue(self.lockscreen.unlock())

def test_wifi(self):
self.data_layer.enable_wifi()
time.sleep(5)
self.data_layer.connect_to_wifi('Mozilla Guest')
time.sleep(5)
self.data_layer.forget_wifi('Mozilla Guest')
time.sleep(5)
self.data_layer.disable_wifi()

def tearDown(self):

# close the app
if hasattr(self, 'app'):
self.apps.kill(self.app)

GaiaTestCase.tearDown(self)