コード例 #1
0
 def test_long_path(self):
     with pytest.raises(InterfaceValidationError):
         assert Repos.to_python({
             '/' * 300: {
                 'name': 'a',
             },
         })
コード例 #2
0
 def test_long_name(self):
     with pytest.raises(InterfaceValidationError):
         assert Repos.to_python({
             '/path/to/sentry': {
                 'name': 'a' * 300,
             },
         })
コード例 #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',
         },
     }
コード例 #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,
         },
     }
コード例 #5
0
 def test_path(self):
     assert Repos().get_path() == 'repos'
コード例 #6
0
 def test_missing_name(self):
     with pytest.raises(InterfaceValidationError):
         assert Repos.to_python({
             '/path/to/sentry': {},
         })