def test_02_export_channels(self):
 
     Import_Export_Test.exported_data = get_data()
     
     monitor_channel = Channel(Import_Export_Test.exported_data["monitor"])
     
     test_category = Category("test")
     test_category.add("monitor",monitor_channel)
     
     Import_Export_Test.exported_data["monitor1"] = get_data()["monitor"]
     test_category.add("monitor1",monitor_channel)
     
     exporter  = JSON_Exporter()
     exporter.to_JSON(path,test_category.get_channels(),Channel_Encoder)
     print("\n")
     _print_("exporting channels to json file = " 
            + path 
            + "\n"
            +json.dumps(Import_Export_Test.exported_data
            ,indent = 4 , cls = Channel_Encoder))
     
     size = file_util.file_size(path)
     self.assertNotEqual(0,size)
     
     print("----------------------------------------------------------------------")
    def test_02_export_channels(self):

        Import_Export_Test.exported_data = get_data()

        monitor_channel = Channel(Import_Export_Test.exported_data["monitor"])

        test_category = Category("test")
        test_category.add("monitor", monitor_channel)

        Import_Export_Test.exported_data["monitor1"] = get_data()["monitor"]
        test_category.add("monitor1", monitor_channel)

        exporter = JSON_Exporter()
        exporter.to_JSON(path, test_category.get_channels(), Channel_Encoder)
        print("\n")
        _print_("exporting channels to json file = " + path + "\n" +
                json.dumps(Import_Export_Test.exported_data,
                           indent=4,
                           cls=Channel_Encoder))

        size = file_util.file_size(path)
        self.assertNotEqual(0, size)

        print(
            "----------------------------------------------------------------------"
        )
 def test_01_delete_channels_data(self):
 
     print("\n")
     _print_("deleting existing sample_data...")
     file_util.file_del(path)
     size = file_util.file_size(path)
     self.assertEqual(0,size)
     
     print("----------------------------------------------------------------------")
    def test_01_delete_channels_data(self):

        print("\n")
        _print_("deleting existing sample_data...")
        file_util.file_del(path)
        size = file_util.file_size(path)
        self.assertEqual(0, size)

        print(
            "----------------------------------------------------------------------"
        )