Fix tests
This commit is contained in:
parent
a7e86793c3
commit
32aec52918
|
@ -15,7 +15,7 @@ class TestCon(unittest.TestCase):
|
|||
def testLookup(self):
|
||||
def _dns_complete(canonname, ip, sockaddr, arg1, my_karg):
|
||||
self.assertEqual(canonname, 'google-public-dns-a.google.com')
|
||||
self.assertEqual(ip, '8.8.8.8')
|
||||
self.assertIn(ip, ('8.8.8.8', '2001:4860:4860::8888'))
|
||||
self.assertEqual(arg1, "arg1")
|
||||
self.assertEqual(my_karg, 1234)
|
||||
self.complete = True
|
||||
|
@ -23,7 +23,7 @@ class TestCon(unittest.TestCase):
|
|||
|
||||
self.complete = False
|
||||
ecore_con.Lookup('google-public-dns-a.google.com',
|
||||
_dns_complete, "arg1", my_karg=1234)
|
||||
_dns_complete, "arg1", my_karg=1234)
|
||||
|
||||
t = ecore.Timer(TIMEOUT, ecore.main_loop_quit)
|
||||
ecore.main_loop_begin()
|
||||
|
@ -35,7 +35,7 @@ class TestCon(unittest.TestCase):
|
|||
self.complete_counter = 0
|
||||
self.progress_counter = 0
|
||||
self.exit_counter = 3 # we expect 3 complete cb calls
|
||||
self.test_url = 'http://www.example.com'
|
||||
self.test_url = 'http://www.google.com'
|
||||
self.received_data = []
|
||||
|
||||
def _on_complete(event, add=1):
|
||||
|
@ -87,7 +87,7 @@ class TestCon(unittest.TestCase):
|
|||
u.delete()
|
||||
|
||||
def testUrlDelete(self):
|
||||
self.test_url1 = 'http://www.example.com'
|
||||
self.test_url1 = 'http://www.facebook.com'
|
||||
self.test_url2 = 'http://www.google.com'
|
||||
self.complete_counter = 0
|
||||
|
||||
|
@ -131,7 +131,7 @@ class TestCon(unittest.TestCase):
|
|||
u2.delete()
|
||||
|
||||
def testUrlToFile(self):
|
||||
self.test_url = 'http://www.example.com'
|
||||
self.test_url = 'http://www.google.com'
|
||||
self.complete = False
|
||||
|
||||
def _on_complete(event):
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import unittest
|
||||
import logging
|
||||
|
||||
from efl import evas
|
||||
from efl import ecore
|
||||
from efl import edje
|
||||
import os, unittest
|
||||
import logging
|
||||
|
||||
|
||||
theme_path = os.path.dirname(os.path.abspath(__file__))
|
||||
|
@ -111,9 +113,9 @@ class TestEdjeObject(unittest.TestCase):
|
|||
o.delete()
|
||||
|
||||
def testSignals(self):
|
||||
expected_signals = ["seat,added,seat1,default", "edje,language,none",
|
||||
"edje,state,ltr", "load", "edje,state,ltr",
|
||||
"resize", "quit"]
|
||||
expected_signals = ["edje,language,none", "edje,state,ltr", "load",
|
||||
"edje,state,ltr", "resize", "quit"]
|
||||
|
||||
def _signal_cb(obj, emission, source):
|
||||
expected_signals.remove(emission)
|
||||
if emission == "quit":
|
||||
|
|
|
@ -13,9 +13,9 @@ theme_path = os.path.dirname(os.path.abspath(__file__))
|
|||
theme_file = os.path.join(theme_path, "theme.edj")
|
||||
|
||||
|
||||
expected_signals = ["seat,added,seat1,default", "edje,language,none",
|
||||
"edje,state,ltr", "load", "edje,state,ltr", "resize",
|
||||
"emit,message", "emit,message"]
|
||||
expected_signals = ["edje,language,none", "edje,state,ltr", "load",
|
||||
"edje,state,ltr", "resize", "emit,message", "emit,message",
|
||||
"edje,text,changed", "edje,text,changed"]
|
||||
expected_signals2 = ["load", "resize"]
|
||||
expected_messages = [33, 33]
|
||||
expected_text_parts = ["label", "label"]
|
||||
|
@ -25,7 +25,6 @@ class MyEdje(Edje):
|
|||
def __init__(self, canvas):
|
||||
Edje.__init__(self, canvas, file=theme_file, group="main")
|
||||
|
||||
|
||||
@edje.on_signal("*", "*")
|
||||
def cb_signal_all(self, emission, source):
|
||||
if source == "" or source == "edje":
|
||||
|
|
|
@ -24,6 +24,7 @@ Elm_Web -> Web
|
|||
|
||||
"""
|
||||
|
||||
|
||||
class TestElmClassNames(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue