Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'local_ads/pylocal_ads/bindings_test.py')
-rw-r--r--local_ads/pylocal_ads/bindings_test.py31
1 files changed, 13 insertions, 18 deletions
diff --git a/local_ads/pylocal_ads/bindings_test.py b/local_ads/pylocal_ads/bindings_test.py
index 4decdc314a..f183a99120 100644
--- a/local_ads/pylocal_ads/bindings_test.py
+++ b/local_ads/pylocal_ads/bindings_test.py
@@ -1,27 +1,22 @@
-from pylocal_ads import (Campaign, serialize, deserialize)
+import unittest
+from pylocal_ads import (Campaign, serialize, deserialize)
-def smoke():
- campaigns = [
- Campaign(10, 10, 10, 10, 0),
- Campaign(1000, 100, 20, 17, 7),
- Campaign(120003, 456, 15, 13, 6)
- ]
- serialized = serialize(campaigns)
- result = deserialize(serialized)
+class PyLocalAdsTest(unittest.TestCase):
- if campaigns.sort() == result.sort():
- return True
+ def test_smoke(self):
+ campaigns = [
+ Campaign(10, 10, 10, 10, 0),
+ Campaign(1000, 100, 20, 17, 7),
+ Campaign(120003, 456, 15, 13, 6)
+ ]
- return False
+ serialized = serialize(campaigns)
+ result = deserialize(serialized)
+ self.assertEqual(campaigns.sort(), result.sort())
-def main():
- if smoke():
- print "Smoke OK"
- else:
- print "Smoke FAIL"
if __name__ == "__main__":
- main()
+ unittest.main()