예제 #1
0
파일: tests.py 프로젝트: vartagg/sentry
    def test_an_alias_maps_correctly(self, import_string):
        alias, full_path = INTERFACE_ALIASES.items()[0]

        result = validate_data(self.project, {"project": self.project.id, "message": "foo", alias: {"foo": "bar"}})
        import_string.assert_called_once_with(full_path)
        interface = import_string.return_value
        interface.assert_called_once_with(foo="bar")
        assert alias not in result
        assert full_path in result
        assert result[full_path] == interface.return_value.serialize.return_value
예제 #2
0
파일: tests.py 프로젝트: jayakumark/sentry
    def test_an_alias_maps_correctly(self, import_string):
        alias, full_path = INTERFACE_ALIASES.items()[0]

        result = validate_data(self.project, {
            'project': self.project.id,
            'message': 'foo',
            alias: {'foo': 'bar'},
        })
        import_string.assert_called_once_with(full_path)
        interface = import_string.return_value
        interface.assert_called_once_with(foo='bar')
        assert alias not in result
        assert full_path in result
        assert result[full_path] == interface.return_value.serialize.return_value
예제 #3
0
    def test_an_alias_maps_correctly(self, import_string):
        alias, full_path = INTERFACE_ALIASES.items()[0]

        result = validate_data(self.project, {
            'project': self.project.id,
            'message': 'foo',
            alias: {'foo': 'bar'},
        })
        import_string.assert_called_once_with(full_path)
        interface = import_string.return_value
        interface.assert_called_once_with(foo='bar')
        assert alias not in result
        assert full_path in result
        assert result[full_path] == interface.return_value.serialize.return_value