'''
Created on 16 juin 2014

@author: etienne
'''
import unittest
from os.path import join
from qgis.core import QgsApplication
from QuickOSM.CoreQuickOSM.Parser.OsmParser import OsmParser

class TestOsmParser(unittest.TestCase):
    def osmTestDefault(self):


        
        parser = OsmParser(join("data_test","bld.osm"))
        result = parser.parse()
        assert result['multipolygons']['featureCount'] == 1
        QgsApplication.exitQgis()
        

if __name__ == "__main__":
    
    #import sys;sys.argv = ['', 'Test.test']
    
    QgsApplication.setPrefixPath('/usr', True)  
    QgsApplication.initQgis()
    unittest.main()
    #