from pyxform.tests_v1.pyxform_test_case import PyxformTestCase


class AuditTest(PyxformTestCase):
    def test_background_audio(self):
        self.assertPyxformXform(
            name="data",
            md="""
            | survey |                   |                 |
            |        | type              |   name          |
            |        | background-audio  |   my_recording  |
            """,
            xml__contains=[
                '<odk:recordaudio event="odk-instance-load" ref="/data/my_recording"/>',
            ],
        )

from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
import unittest


class BackgroundAudioTest(PyxformTestCase):
    def test_background_audio(self):
        self.assertPyxformXform(
            name="data",
            md="""
            | survey |                   |                 |
            |        | type              |   name          |
            |        | background-audio  |   my_recording  |
            """,
            xml__contains=[
                '<odk:recordaudio event="odk-instance-load" ref="/data/my_recording"/>',
            ],
        )

    @unittest.skip("Required update to Validate to work")
    def test_background_audio_is_valid(self):
        self.assertPyxformXform(
            name="data",
            md="""
            | survey |                   |                 |
            |        | type              |   name          |
            |        | background-audio  |   my_recording  |
            """,
            run_odk_validate=True,
        )

Add ignored test for recordaction validation
Add ignored test for recordaction validation

  from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
+ import unittest
  
  
- class AuditTest(PyxformTestCase):
+ class BackgroundAudioTest(PyxformTestCase):
      def test_background_audio(self):
          self.assertPyxformXform(
              name="data",
              md="""
              | survey |                   |                 |
              |        | type              |   name          |
              |        | background-audio  |   my_recording  |
              """,
              xml__contains=[
                  '<odk:recordaudio event="odk-instance-load" ref="/data/my_recording"/>',
              ],
          )
  
+     @unittest.skip("Required update to Validate to work")
+     def test_background_audio_is_valid(self):
+         self.assertPyxformXform(
+             name="data",
+             md="""
+             | survey |                   |                 |
+             |        | type              |   name          |
+             |        | background-audio  |   my_recording  |
+             """,
+             run_odk_validate=True,
+         )
+ 
Add ignored test for recordaction validation
## Code Before:
from pyxform.tests_v1.pyxform_test_case import PyxformTestCase


class AuditTest(PyxformTestCase):
    def test_background_audio(self):
        self.assertPyxformXform(
            name="data",
            md="""
            | survey |                   |                 |
            |        | type              |   name          |
            |        | background-audio  |   my_recording  |
            """,
            xml__contains=[
                '<odk:recordaudio event="odk-instance-load" ref="/data/my_recording"/>',
            ],
        )

## Instruction:
Add ignored test for recordaction validation
## Code After:
from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
import unittest


class BackgroundAudioTest(PyxformTestCase):
    def test_background_audio(self):
        self.assertPyxformXform(
            name="data",
            md="""
            | survey |                   |                 |
            |        | type              |   name          |
            |        | background-audio  |   my_recording  |
            """,
            xml__contains=[
                '<odk:recordaudio event="odk-instance-load" ref="/data/my_recording"/>',
            ],
        )

    @unittest.skip("Required update to Validate to work")
    def test_background_audio_is_valid(self):
        self.assertPyxformXform(
            name="data",
            md="""
            | survey |                   |                 |
            |        | type              |   name          |
            |        | background-audio  |   my_recording  |
            """,
            run_odk_validate=True,
        )
