Ejemplo n.º 1
0
 def test_long_path(self):
     with pytest.raises(InterfaceValidationError):
         assert Repos.to_python({
             '/' * 300: {
                 'name': 'a',
             },
         })
Ejemplo n.º 2
0
 def test_long_name(self):
     with pytest.raises(InterfaceValidationError):
         assert Repos.to_python({
             '/path/to/sentry': {
                 'name': 'a' * 300,
             },
         })
Ejemplo n.º 3
0
 def test_minimal_valid(self):
     assert Repos.to_python({
         '/path/to/sentry': {
             'name': 'sentry-unity',
         },
     }).to_json() == {
         '/path/to/sentry': {
             'name': 'sentry-unity',
         },
     }
Ejemplo n.º 4
0
 def test_full_valid(self):
     assert Repos.to_python({
         '/path/to/sentry': {
             'name': 'sentry-unity',
             'prefix': 'src',
             'revision': 'a' * 40,
         },
     }).to_json() == {
         '/path/to/sentry': {
             'name': 'sentry-unity',
             'prefix': 'src',
             'revision': 'a' * 40,
         },
     }
Ejemplo n.º 5
0
 def test_path(self):
     assert Repos().get_path() == 'repos'
Ejemplo n.º 6
0
 def test_missing_name(self):
     with pytest.raises(InterfaceValidationError):
         assert Repos.to_python({
             '/path/to/sentry': {},
         })