from unittest import TestCase

from win_unc import validators as V


class TestIsValidDriveLetter(TestCase):
    def test_valid(self):
        self.assertTrue(V.is_valid_drive_letter('A'))
        self.assertTrue(V.is_valid_drive_letter('Z'))
        self.assertTrue(V.is_valid_drive_letter('a'))
        self.assertTrue(V.is_valid_drive_letter('z'))

    def test_invalid(self):
        self.assertFalse(V.is_valid_drive_letter(''))
        self.assertFalse(V.is_valid_drive_letter(':'))
        self.assertFalse(V.is_valid_drive_letter('aa'))
        self.assertFalse(V.is_valid_drive_letter('a:'))

from unittest import TestCase

from win_unc import validators as V


class TestIsValidDriveLetter(TestCase):
    def test_valid(self):
        self.assertTrue(V.is_valid_drive_letter('A'))
        self.assertTrue(V.is_valid_drive_letter('Z'))
        self.assertTrue(V.is_valid_drive_letter('a'))
        self.assertTrue(V.is_valid_drive_letter('z'))

    def test_invalid(self):
        self.assertFalse(V.is_valid_drive_letter(''))
        self.assertFalse(V.is_valid_drive_letter(':'))
        self.assertFalse(V.is_valid_drive_letter('aa'))
        self.assertFalse(V.is_valid_drive_letter('a:'))


class TestIsValidUncPath(TestCase):
    def test_valid(self):
        self.assertTrue(V.is_valid_unc_path(r'\\a'))
        self.assertTrue(V.is_valid_unc_path(r'\\a\b\c'))
        self.assertTrue(V.is_valid_unc_path(r'\\ABC\\'))

    def test_invalid(self):
        self.assertFalse(V.is_valid_unc_path(''))
        self.assertFalse(V.is_valid_unc_path(r'\\'))
        self.assertFalse(V.is_valid_unc_path(r'\\\a'))
        self.assertFalse(V.is_valid_unc_path(r'C:\path'))
        self.assertFalse(V.is_valid_unc_path(r'\\<a>'))

Add tests for UNC path validator
Add tests for UNC path validator

  from unittest import TestCase
  
  from win_unc import validators as V
  
  
  class TestIsValidDriveLetter(TestCase):
      def test_valid(self):
          self.assertTrue(V.is_valid_drive_letter('A'))
          self.assertTrue(V.is_valid_drive_letter('Z'))
          self.assertTrue(V.is_valid_drive_letter('a'))
          self.assertTrue(V.is_valid_drive_letter('z'))
  
      def test_invalid(self):
          self.assertFalse(V.is_valid_drive_letter(''))
          self.assertFalse(V.is_valid_drive_letter(':'))
          self.assertFalse(V.is_valid_drive_letter('aa'))
          self.assertFalse(V.is_valid_drive_letter('a:'))
  
+ 
+ class TestIsValidUncPath(TestCase):
+     def test_valid(self):
+         self.assertTrue(V.is_valid_unc_path(r'\\a'))
+         self.assertTrue(V.is_valid_unc_path(r'\\a\b\c'))
+         self.assertTrue(V.is_valid_unc_path(r'\\ABC\\'))
+ 
+     def test_invalid(self):
+         self.assertFalse(V.is_valid_unc_path(''))
+         self.assertFalse(V.is_valid_unc_path(r'\\'))
+         self.assertFalse(V.is_valid_unc_path(r'\\\a'))
+         self.assertFalse(V.is_valid_unc_path(r'C:\path'))
+         self.assertFalse(V.is_valid_unc_path(r'\\<a>'))
+ 
Add tests for UNC path validator
## Code Before:
from unittest import TestCase

from win_unc import validators as V


class TestIsValidDriveLetter(TestCase):
    def test_valid(self):
        self.assertTrue(V.is_valid_drive_letter('A'))
        self.assertTrue(V.is_valid_drive_letter('Z'))
        self.assertTrue(V.is_valid_drive_letter('a'))
        self.assertTrue(V.is_valid_drive_letter('z'))

    def test_invalid(self):
        self.assertFalse(V.is_valid_drive_letter(''))
        self.assertFalse(V.is_valid_drive_letter(':'))
        self.assertFalse(V.is_valid_drive_letter('aa'))
        self.assertFalse(V.is_valid_drive_letter('a:'))

## Instruction:
Add tests for UNC path validator
## Code After:
from unittest import TestCase

from win_unc import validators as V


class TestIsValidDriveLetter(TestCase):
    def test_valid(self):
        self.assertTrue(V.is_valid_drive_letter('A'))
        self.assertTrue(V.is_valid_drive_letter('Z'))
        self.assertTrue(V.is_valid_drive_letter('a'))
        self.assertTrue(V.is_valid_drive_letter('z'))

    def test_invalid(self):
        self.assertFalse(V.is_valid_drive_letter(''))
        self.assertFalse(V.is_valid_drive_letter(':'))
        self.assertFalse(V.is_valid_drive_letter('aa'))
        self.assertFalse(V.is_valid_drive_letter('a:'))


class TestIsValidUncPath(TestCase):
    def test_valid(self):
        self.assertTrue(V.is_valid_unc_path(r'\\a'))
        self.assertTrue(V.is_valid_unc_path(r'\\a\b\c'))
        self.assertTrue(V.is_valid_unc_path(r'\\ABC\\'))

    def test_invalid(self):
        self.assertFalse(V.is_valid_unc_path(''))
        self.assertFalse(V.is_valid_unc_path(r'\\'))
        self.assertFalse(V.is_valid_unc_path(r'\\\a'))
        self.assertFalse(V.is_valid_unc_path(r'C:\path'))
        self.assertFalse(V.is_valid_unc_path(r'\\<a>'))
